5.3. Translations¶
5.3.2. What to do¶
Essentially, you have to run two scripts:
scripts/makemessages.sh
scripts/compilemessages.sh
5.3.3. Mac: install gettext¶
brew install gettext
in Terminal and thenbrew link gettext --force
to make it work ;)
5.3.4. Manual way (deprecated for our project)¶
Run django-admin makemessages -a
to create the .po files.
Note: Works only with gettext
installed, see below for installation
Then after you’ve updated the German text in the .po file you can run
django-admin compilemessages
to compile the language files.
Check in the language files to git as well, we don’t compile a second time on the live server.
Please use English as the default language and then add German translations.
5.3.4.1. Generate new binary files (.mo) after changing ASCII file (.po)¶
docker-compose run --rm django python3 manage.py compilemessage