Translations
The ODE supports several languages following the Qt Framework practices for internationalization.
Internationalization workflow
Note
The ODE provides a python build.py update-translations and python build.py compile-translations command for all the supported languages. Check the project’s build.py file for reference.
Create or update translation files by running
python build.py update-translations(or thepyside6-lupdatecommand directly if you are in MacOS)Update the translation files:
Complete
unfinishedtranslations (this is the actual addition of translated text).Clean
vanishedtranslations.
Compile the translations files by running
python build.py compile-translations(or thepyside6-lreleasecommand directly if you are in MacOS)Commit both the
.tsand.qmfiles.Create a PR with the changes.
All translation files are located in the ode/assets/translations/ folder.
Translation Tools
For updating translations you can use either:
A text editor to directly update the translation files (*.ts)
Install Qt and use Qt Linguist application to do the translation using a UI.
Adding new languages
When adding a new language two extra changes are required:
Add the new language to both
python build.py update-translationsandpython build.py compile-translationscommands of thebuild.pyfile. (after doing this you can run thepython build.py update-translationsand it will create the.tsfile for you.)Update the
languageQComboBox of themain.pyfile so the new language appears as an option to the user.
Here is a reference Pull Request of what is expected when adding a new language: https://github.com/okfn/opendataeditor/pull/750