From eb872592348299e7865a9a2b879954228fcc55d5 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 8 Jul 2020 13:25:52 -0400 Subject: [PATCH] docs: update tldr for the translation scripts readme --- scripts/translationScripts/README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/translationScripts/README.md b/scripts/translationScripts/README.md index 15427eba28..2cc3b772c6 100644 --- a/scripts/translationScripts/README.md +++ b/scripts/translationScripts/README.md @@ -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