chore(translations): update I18N docs

This commit is contained in:
Patryk Osmaczko 2022-07-14 19:11:09 +02:00 committed by osmaczko
parent 7390bed49e
commit c50dc61060
1 changed files with 6 additions and 16 deletions

22
I18N.md
View File

@ -4,29 +4,19 @@ App is translated to many different languages through lokalise.com platform.
## TLDR
#### Update base translations file
### 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
### Update translations
1. Create pull request with exported translations using lokalise.com, see [docs](https://docs.lokalise.com/en/articles/1684090-github)
## 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.
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
4. Create pull request with exported translations