1.4 KiB
1.4 KiB
Internationalization
App is translated to many different languages through lokalise.com platform.
TLDR
Update base translations file
- Update qml_en.ts file:
cd scripts/translationScripts && python update-en-ts.py
- Ensure updated qml_en.ts file lands on master
Update translation binaries
- Download translated *.ts files from lokalise.com
- Override ui/i18n/*.ts files with downloaded ones
- Create translation binaries
lrelease ui/i18n/*.ts
- Commit updated *.ts and *.qm files
Lokalise workflow
Lokalise is a continuous localization and translation management platform. It integrates into development workflow and automates localization process.
Lokalise workflow:
- Upload english strings (qml_en.ts) to Lokalise project. This is done automatically, Lokalise auto-pull changes done to master's qml_en.ts file.
- Translate strings to target languages. Target languages are driven by Lokalise configuration. Translations are done by community.
- Export *.ts files with translations (e.g. qml_de.ts, qml_en.ts)
Updating translation files
Updating the QML translation files is very easy, as it comes with QT directly. It will scan all files in the projects (those listed in the SOURCE
section of the .pro
file) and then add or modify them in the XML-like .ts
files.
Generating binary translation files
To have the final translation files that will be used by the app, just run lrelease i18n/*.ts
in the ui/
directory