Add support for translations + French · Pull Request #418 · openandroidinstaller-dev/openandroidinstaller
This PR adds a working translation of OAI in French.
As suggested in #72, this PR use gettext for all strings (I think), except logs (and for now, config files)
The user's language is detected, and if available, the corresponding translation is used. Else, OAI is still shown in English.
All English text strings are still in the code. Translation files are bigger, but partial translations files show English version if not translated. We may also use little strings to refer to the text for all languages, including English, but a change may not automatically be reflected in others languages and the code is less legible.
To generate .pot file (empty template), use the following command on Linux :
xgettext -d base -o locales/base.pot openandroidinstaller/*.py openandroidinstaller/views/*.py
To generate .mo file (binary data), use this command on the .mo file' folder :
msgfmt -o base.mo base
PS : First commit is messy and a temporary fix. We have to find a better way to handle Python versions.
EDIT : Oops, I didn't ask for the two first commits, lancelot is another PR...
Ah, it's because you pushed to main these two today... (instead of dev?)