The easiest way to help translate Who Goes First is to use the translate.whogoest1st.com web translation service, called Weblate.
- Register for an account.
- Click the activation link in your email.
- Go to the Who Goes First project page in the translate tool.
- Selected the language you wish to translate.
- Find strings you want to translate and suggest translations.
See the Weblate translators guide for more detailed instructions.
If your language is not listed in Weblate, please file a new issue on GitHub describing the language you would like added.
Or, if you are comfortable with code, follow the instructions below to add a new language and send a pull request.
First set up a development environment as described in CONTRIBUTING.md.
Extract messages to pull messages out of Python files and templates for translation.
pybabel extract -F babel.cfg --no-wrap -o messages.pot .
Then update the language catalog so that all language files get the new messages.
pybabel update -i messages.pot -d ./translations
After extracting messages, you can add a new language to the catalog.
pybabel init -i messages.pot -d ./translations -l fr
You also must add the language to the LANGUAGES
dictionary in
whogoesfirst.py
.
Run poedit and translate text.
Compile translations so that they appear in the app.
pybabel compile -d ./translations
You can test that the messages appear in the app by running the development version.
python whogoesfirst.py