update README translation instructions

This commit is contained in:
Dan Ballard 2019-03-14 16:37:18 -07:00
parent 4c1fd05425
commit 68f4bee72e
1 changed files with 15 additions and 1 deletions

View File

@ -46,4 +46,18 @@ Currently you will need to manually run tor first before running cwtch.im/ui. Us
## Translations
Translations can be update by runing QT Linguist in the project directory (`linguist`) and loading and editing any of the `i18n/translate_*.ts` files. To add a new translation, please register the file in qml.qrc. To update translations, run `lupdate ui.pro` to update the editable .ts files and when you are done run `lrelease ui.pro` to generate the .qm files that are used at runtime.
### Add new translation
Edit `ui.pro` and add a new line in the variable definition for `TRANSLATIONS` like:
TRANSLATIONS = i18n/translation_en.ts \
i18n/translation_de.ts
Then to update and generate your new translation file, run `lupdate ui.pro` and you will find your new file in the `i18n/` directory.
### Updating translations
Run `lupdate ui.pro` to update all the translation files in the `i18n/` directory, then edit your languages' .ts file to make the appropriate changes. It is recommended to use QT Linguist (`linguist`) to edit the files.
When done, run `lrelease ui.pro` to compile all the translations from their .ts files into .qm files for use in the program. Then you can compile the ui program.