Update i18n readme (#1539)
This commit is contained in:
@@ -48,6 +48,7 @@ instance `en_GB` for British English.
|
|||||||
You will need the translation tool Qt 5 Linguist on your system.
|
You will need the translation tool Qt 5 Linguist on your system.
|
||||||
|
|
||||||
For Ubuntu/Debian, run:
|
For Ubuntu/Debian, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install qttools5-dev-tools
|
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
|
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:
|
current source code, you must first run the `qtlupdate` command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 pkgutils.py qtlupdate i18n/nw_XX.ts
|
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
|
For instance, the French translation uses the language code `fr_FR`, so its translation file will
|
||||||
be `nw_fr_FR.ts`
|
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
|
### 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 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
|
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:
|
English. These files are not generated by default, but they can be built with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 pkgutils.py qtlrelease
|
python3 pkgutils.py qtlrelease
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ def buildQtI18nTS(sysArgs):
|
|||||||
from PyQt6.lupdate import lupdate
|
from PyQt6.lupdate import lupdate
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("ERROR: This command requires lupdate from PyQt6")
|
print("ERROR: This command requires lupdate from PyQt6")
|
||||||
|
print("On Debian/Ubuntu, install: pyqt6-dev-tools")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
|
|||||||
Reference in New Issue
Block a user