mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +00:00
feat(locale): the panel offers only the languages it is translated into
The language choice on the Settings page listed every language Django knows, 99 of them. Six catalogs (Czech under the wrong code, German, Spanish, French, Russian, Ukrainian) translated none of the panel's messages, so choosing one of them, like most of the others, showed English. The Turkish catalog lacked the four newest messages. The panel now offers English and Turkish (LANGUAGES). The empty catalogs and the English one, which has nothing to translate, are removed. Turkish translates every message again. CI checks that the offered catalogs translate every message and that their compiled files are up to date; the README says how to update them.
This commit is contained in:
parent
2d47f87dcb
commit
9f2cd664e6
20 changed files with 791 additions and 28791 deletions
10
README.md
10
README.md
|
|
@ -736,6 +736,16 @@ python3 dev/console_layout.py us "English (US)" --model pc104 # a keyboard with
|
|||
|
||||
It lists the dead keys it leaves out: a character only a dead key types cannot be typed. Type a sample with every character group of the layout into a VM set to that layout before committing the file.
|
||||
|
||||
### Translations
|
||||
|
||||
The panel is translated into the languages of `LANGUAGES` in `settings.py`, each with a full catalog in `locale/`. A new or changed text needs its translation in each before CI passes (needs `gettext`):
|
||||
|
||||
```bash
|
||||
python manage.py makemessages -l tr --no-obsolete --ignore=staticfiles --ignore=.venv
|
||||
# translate the new and fuzzy entries of locale/tr/LC_MESSAGES/django.po
|
||||
python manage.py compilemessages -l tr
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue