docs: update tldr for the translation scripts readme

This commit is contained in:
Jonathan Rainville 2020-07-08 13:25:52 -04:00 committed by Iuri Matias
parent a8f1dd3eaa
commit eb87259234
1 changed files with 14 additions and 10 deletions

View File

@ -5,10 +5,14 @@ These scripts are used to translate the app automatically by reusing the existin
## TLDR
1. Copy the translation files from https://github.com/status-im/status-react/tree/develop/translations to `/nim-status-client/scripts/translationScripts/status-react-translations`
2. Run `node qstrConverter.js` in the `translationScripts/` directory
3. Run `lupdate` in the `ui/` directory
4. [Optional] Manually translate the remaining strings in QT Linguist
5. Run `lrelease -idbased i18n/*.ts` in the `ui/` directory
2. `cd scripts/translationScripts`
3. Run `npm install`
4. Run `node qstrConverter.js`
5. Open another terminal and `cd ui`
6. In that second terminal, run `lupdate nim-status-client.pro`
7. Back in the first terminal, run `node xmlTranslator.js`
7. [Optional] Manually translate the remaining strings in QT Linguist
9. In the second terminal, run `lrelease -idbased i18n/*.ts` in the `ui/` directory
:tada: You're files are converted to use `qsTrId` and the translation files are updated.
@ -26,6 +30,12 @@ First, copy the translation files from https://github.com/status-im/status-react
Then, run `node qstrConverter.js` in the `translationScripts/` directory.
## Updating translation files
Updating the QML translation files is then 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.
Just run `lupdate nim-status-client.pro` in the `ui/` directory.
## Run XML translator script
Most translations are already done in Status-React. To add those translations to the right `.ts` file, run `node xmlTranslator.js` in the `translationScripts/` directory.
@ -44,12 +54,6 @@ To do so, you can use QT Linguist to help with the process. Check here to see th
To open a TS file in QT Linguist, either open the software and use the `Open` feature it has, or go in the `ui/i18n` directory and run `linguist nameOfFile.ts`
## Updating translation files
Updating the QML translation files is then 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.
Just run `lupdate` in the `ui/` directory.
## Generating binary translation files
To have the final translation files that will be used by the app, just run `lrelease -idbased i18n/*.ts` in the `ui/` directory