Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: ["opened", "synchronize", "ready_for_review"]

jobs:
lint-apiserver:
lint-server:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -17,10 +17,10 @@ jobs:
python-version: "3.x" # Specify the Python version you need
- name: Install Pylint
run: python -m pip install ruff
- name: Install Apiserver Dependencies
run: cd apiserver && pip install -r requirements.txt
- name: Lint apiserver
run: ruff check --fix apiserver
- name: Install Server Dependencies
run: cd apps/server && pip install -r requirements.txt
- name: Lint apps/server
run: ruff check --fix apps/server

lint-admin:
if: github.event.pull_request.draft == false
Expand Down
87 changes: 50 additions & 37 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ When opening a new issue, please use a clear and concise title that follows this
- For documentation: `📘 Docs: [short description]`

**Examples:**

- `🐛 Bug: API token expiry time not saving correctly`
- `📘 Docs: Clarify RAM requirement for local setup`
- `🚀 Feature: Allow custom time selection for token expiration`
Expand All @@ -47,7 +48,7 @@ This helps us triage and manage issues more efficiently.

The project is a monorepo, with backend api and frontend in a single repo.

The backend is a django project which is kept inside apiserver
The backend is a django project which is kept inside apps/server

1. Clone the repo

Expand Down Expand Up @@ -105,11 +106,13 @@ To ensure consistency throughout the source code, please keep these rules in min
- **Improve documentation** - fix incomplete or missing [docs](https://docs.plane.so/), bad wording, examples or explanations.

## Contributing to language support

This guide is designed to help contributors understand how to add or update translations in the application.

### Understanding translation structure

#### File organization

Translations are organized by language in the locales directory. Each language has its own folder containing JSON files for translations. Here's how it looks:

```
Expand All @@ -122,7 +125,9 @@ packages/i18n/src/locales/
└── [language]/
└── translations.json
```

#### Nested structure

To keep translations organized, we use a nested structure for keys. This makes it easier to manage and locate specific translations. For example:

```json
Expand All @@ -137,81 +142,88 @@ To keep translations organized, we use a nested structure for keys. This makes i
```

### Translation formatting guide

We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/) to handle dynamic content, such as variables and pluralization. Here's how to format your translations:

#### Examples

- **Simple variables**
```json
{

```json
{
"greeting": "Hello, {name}!"
}
```
}
```

- **Pluralization**
```json
{
```json
{
"items": "{count, plural, one {Work item} other {Work items}}"
}
```
}
```

### Contributing guidelines

#### Updating existing translations

1. Locate the key in `locales/<language>/translations.json`.

2. Update the value while ensuring the key structure remains intact.
3. Preserve any existing ICU formats (e.g., variables, pluralization).

#### Adding new translation keys

1. When introducing a new key, ensure it is added to **all** language files, even if translations are not immediately available. Use English as a placeholder if needed.

2. Keep the nesting structure consistent across all languages.

3. If the new key requires dynamic content (e.g., variables or pluralization), ensure the ICU format is applied uniformly across all languages.

### Adding new languages

Adding a new language involves several steps to ensure it integrates seamlessly with the project. Follow these instructions carefully:

1. **Update type definitions**
Add the new language to the TLanguage type in the language definitions file:
1. **Update type definitions**
Add the new language to the TLanguage type in the language definitions file:

```typescript
// types/language.ts
export type TLanguage = "en" | "fr" | "your-lang";
```
```typescript
// types/language.ts
export type TLanguage = "en" | "fr" | "your-lang";
```

2. **Add language configuration**
Include the new language in the list of supported languages:
2. **Add language configuration**
Include the new language in the list of supported languages:

```typescript
// constants/language.ts
export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
{ label: "English", value: "en" },
{ label: "Your Language", value: "your-lang" }
];
```
```typescript
// constants/language.ts
export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
{ label: "English", value: "en" },
{ label: "Your Language", value: "your-lang" }
];
```

3. **Create translation files**
1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).
3. **Create translation files**
1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).

2. Add a `translations.json` file inside the folder.

3. Copy the structure from an existing translation file and translate all keys.

4. **Update import logic**
Modify the language import logic to include your new language:
4. **Update import logic**
Modify the language import logic to include your new language:

```typescript
private importLanguageFile(language: TLanguage): Promise<any> {
switch (language) {
case "your-lang":
return import("../locales/your-lang/translations.json");
// ...
}
}
```
```typescript
private importLanguageFile(language: TLanguage): Promise<any> {
switch (language) {
case "your-lang":
return import("../locales/your-lang/translations.json");
// ...
}
}
```

### Quality checklist

Before submitting your contribution, please ensure the following:

- All translation keys exist in every language file.
Expand All @@ -222,6 +234,7 @@ Before submitting your contribution, please ensure the following:
- There are no missing or untranslated keys.

#### Pro tips

- When in doubt, refer to the English translations for context.
- Verify pluralization works with different numbers.
- Ensure dynamic values (e.g., `{name}`) are correctly interpolated.
Expand Down
22 changes: 12 additions & 10 deletions ENV_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ USE_MINIO=1
NGINX_PORT=80
```

## {PROJECT_FOLDER}/apiserver/.env
## {PROJECT_FOLDER}/apps/server/.env

```
# Backend
Expand All @@ -63,8 +63,6 @@ AWS_S3_ENDPOINT_URL="http://plane-minio:9000"
AWS_S3_BUCKET_NAME="uploads"
# Maximum file upload limit
FILE_SIZE_LIMIT=5242880
# Settings related to Docker
DOCKERIZED=1 # deprecated
# set to 1 If using the pre-configured minio setup
USE_MINIO=1
# Nginx Configuration
Expand All @@ -78,11 +76,15 @@ ADMIN_BASE_URL=
SPACE_BASE_URL=
APP_BASE_URL=
SECRET_KEY="gxoytl7dmnc1y37zahah820z5iq3iozu38cnfjtu3yaau9cd9z"
# RabbitMQ Settings
RABBITMQ_HOST="plane-mq"
RABBITMQ_PORT="5672"
RABBITMQ_USER="plane"
RABBITMQ_PASSWORD="plane"
RABBITMQ_VHOST="plane"
AMQP_URL=""
# Authentication Settings
ENABLE_SIGNUP=1
ENABLE_EMAIL_PASSWORD=1
ENABLE_MAGIC_LINK_LOGIN=0
```

## Updates​

- The naming convention for containers and images has been updated.
- The plane-worker image will no longer be maintained, as it has been merged with plane-backend.
- The Tiptap pro-extension dependency has been removed, eliminating the need for Tiptap API keys.
- The image name for Plane deployment has been changed to plane-space.
12 changes: 6 additions & 6 deletions aio/Dockerfile-app
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

COPY apiserver/requirements.txt ./api/
COPY apiserver/requirements ./api/requirements
COPY apps/server/requirements.txt ./api/
COPY apps/server/requirements ./api/requirements

RUN pip install -r ./api/requirements.txt --compile --no-cache-dir

# Add in Django deps and generate Django's static files
COPY apiserver/manage.py ./api/manage.py
COPY apiserver/plane ./api/plane/
COPY apiserver/templates ./api/templates/
COPY apps/server/manage.py ./api/manage.py
COPY apps/server/plane ./api/plane/
COPY apps/server/templates ./api/templates/
COPY package.json ./api/package.json

COPY apiserver/bin ./api/bin/
COPY apps/server/bin ./api/bin/

RUN chmod +x ./api/bin/*
RUN chmod -R 777 ./api/
Expand Down
3 changes: 0 additions & 3 deletions apps/server/Procfile

This file was deleted.

1 change: 0 additions & 1 deletion apps/server/runtime.txt

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/selfhost/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
api:
image: ${DOCKERHUB_USER:-local}/plane-backend:${APP_RELEASE:-latest}
build:
context: ./apiserver
context: ./apps/server
dockerfile: ./Dockerfile.api

proxy:
Expand Down
24 changes: 12 additions & 12 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ services:

api:
build:
context: ./apiserver
context: ./apps/server
dockerfile: Dockerfile.dev
args:
DOCKER_BUILDKIT: 1
restart: unless-stopped
networks:
- dev_env
volumes:
- ./apiserver:/code
- ./apps/server:/code
command: ./bin/docker-entrypoint-api-local.sh
env_file:
- ./apiserver/.env
- ./apps/server/.env
depends_on:
- plane-db
- plane-redis
Expand All @@ -143,56 +143,56 @@ services:

worker:
build:
context: ./apiserver
context: ./apps/server
dockerfile: Dockerfile.dev
args:
DOCKER_BUILDKIT: 1
restart: unless-stopped
networks:
- dev_env
volumes:
- ./apiserver:/code
- ./apps/server:/code
command: ./bin/docker-entrypoint-worker.sh
env_file:
- ./apiserver/.env
- ./apps/server/.env
depends_on:
- api
- plane-db
- plane-redis

beat-worker:
build:
context: ./apiserver
context: ./apps/server
dockerfile: Dockerfile.dev
args:
DOCKER_BUILDKIT: 1
restart: unless-stopped
networks:
- dev_env
volumes:
- ./apiserver:/code
- ./apps/server:/code
command: ./bin/docker-entrypoint-beat.sh
env_file:
- ./apiserver/.env
- ./apps/server/.env
depends_on:
- api
- plane-db
- plane-redis

migrator:
build:
context: ./apiserver
context: ./apps/server
dockerfile: Dockerfile.dev
args:
DOCKER_BUILDKIT: 1
restart: "no"
networks:
- dev_env
volumes:
- ./apiserver:/code
- ./apps/server:/code
command: ./bin/docker-entrypoint-migrator.sh --settings=plane.settings.local
env_file:
- ./apiserver/.env
- .env
depends_on:
- plane-db
- plane-redis
Expand Down
Loading