Skip to content

Commit

Permalink
chore: add information about translations to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ZolotarevAlexandr committed Oct 30, 2024
1 parent 79c2039 commit eccd94c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ This is the API for music room service in InNoHassle ecosystem.
db_url: postgresql+asyncpg://postgres:your_password@localhost:5432/innohassle-events
```
</details>
7. Compile translation (`.po`) files:
```bash
poetry run pybabel compile -d locales -D messages
```

**Set up PyCharm integrations**

Expand Down Expand Up @@ -132,6 +136,29 @@ Now the API is running on http://localhost:8001. Good job!
poetry run python -m src.bot
```

### Localization

**Aiogram:**

1. Extract messages:
```bash
poetry run pybabel extract -k __ --input-dirs=. -o locales/messages.pot
```
2. Initialize languages:
```bash
poetry run pybabel init -i locales/messages.pot -d locales -D messages -l en
poetry run pybabel init -i locales/messages.pot -d locales -D messages -l ru
```
3. Translate messages in created `.po` files
4. Compile translations:
```bash
poetry run pybabel compile -d locales -D messages
```

**Aiogram dialog:**

Add translations identifiers (strings inside `I18Format`) and their translations to `.ftl` files

### Deployment

We use Docker with Docker Compose plugin to run the website on servers.
Expand Down

0 comments on commit eccd94c

Please sign in to comment.