Translations
The ODE supports several languages following the Qt Framework practices for internationalization.
Internationalization workflow
Note
The ODE provides a make update-translations
and make compile-translations
command for all the supported languages. Check the project’s Makefile
file for reference.
Create or update translation files by running
make update-translations
(or thepyside6-lupdate
command directly if you are in MacOS)Update the translation files:
Complete
unfinished
translations (this is the actual addition of translated text).Clean
vanished
translations.
Compile the translations files by running
make compile-translations
(or thepyside6-lrelease
command directly if you are in MacOS)Commit both the
.ts
and.qm
files.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
make update-translations
andmake compile-translations
commands of theMakefile
. (after doing this you can run themake update-translations
and it will create the.ts
file for you.)Update the
language
QComboBox of themain.py
file 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