diff --git a/i18n/README.md b/i18n/README.md index 159eee73..1c5303a1 100644 --- a/i18n/README.md +++ b/i18n/README.md @@ -48,6 +48,7 @@ instance `en_GB` for British English. You will need the translation tool Qt 5 Linguist on your system. For Ubuntu/Debian, run: + ```bash sudo apt install qttools5-dev-tools ``` @@ -75,6 +76,7 @@ The `i18n` folder at the root of the repository contains the `nw_XX.ts` translat Whether to add a new language to the translation framework, or to update the file against the current source code, you must first run the `qtlupdate` command: + ```bash python3 pkgutils.py qtlupdate i18n/nw_XX.ts ``` @@ -86,6 +88,10 @@ be a valid ISO language code, otherwise novelWriter will not accept the file. For instance, the French translation uses the language code `fr_FR`, so its translation file will be `nw_fr_FR.ts` +Note: The `qtlupdate` command needs the `lupdate` tool provided by PyQt6, which uses the latest +TS file format. The tool in PyQt5 generates an older file format. On Debian/Ubuntu it is provided +by the package `pyqt6-dev-tools`. + ### Edit the Translation File in Qt Linguist @@ -100,6 +106,7 @@ Please select "English" and "United Kingdom" as the _source_ language if prompte The application does not use `.ts` files directly. The `novelwriter/assets/i18n/nw_XX.qm` files are the actual files used to translate the GUI into another language other than the default British English. These files are not generated by default, but they can be built with: + ```bash python3 pkgutils.py qtlrelease ```