33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
# Internationalization
|
|
|
|
App is translated to many different languages through lokalise.com platform.
|
|
|
|
## TLDR
|
|
|
|
#### Update base translations file
|
|
1. Update qml_en.ts file: `cd scripts/translationScripts && python update-en-ts.py`
|
|
2. Ensure updated qml_en.ts file lands on master
|
|
|
|
#### Update translation binaries
|
|
1. Download translated *.ts files from lokalise.com
|
|
2. Override ui/i18n/*.ts files with downloaded ones
|
|
2. Create translation binaries `lrelease ui/i18n/*.ts`
|
|
3. 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:
|
|
1. 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.
|
|
2. Translate strings to target languages. Target languages are driven by Lokalise configuration. Translations are done by community.
|
|
3. 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
|