Skip to content

Commit 66541c9

Browse files
Update translation docs
1 parent 2146c15 commit 66541c9

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

docs/Images/qt-linguist-map.png

93.6 KB
Loading

docs/Translation.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
# Translation
22

3-
GenHotkeys supports Qt's implementation of translations. If you do not have installed Qt 5, feel free to use `Resource\Translations\Tools` tools to edit *.ts files and compile them to the *.qm files.
3+
GenHotkeys supports Qt's implementation of translations. If you do not have to install Qt 5, feel free to use `Resource\Translations\Tools` tools to edit *.ts files or any text editor that supports xml file format, and compile them to the *.qm files.
4+
5+
On the start editor checks all *.qm files in the `Resources\Translations` folder. Filenames are used to makes win32api request to define full language name by the shortcut and display it in the GUI settings dropdown, i.e. `fr.qm` would be displayed as `French` item in dro
6+
7+
MSDN reference:
8+
1. https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getlocaleinfoex
9+
2. https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-enumsystemlocalesex
410

511
## How to use `Qt Linguist`
612

13+
Qt Linguist is an offical Qt tool to translate *.ts translation files.
14+
15+
![Screenshot](Images/qt-linguist-map.png)
16+
17+
GUI Reference:
718

19+
1. List of classes that have translatable strings
20+
2. Accept translation button
21+
3. Strings in class
22+
4. Source string text and its translation
823

924
## How to use `lrelease`
1025

11-
It is a simple CLI tool that compiles *.ts files to the *.qm files. To use this tool run command:
26+
lrelease is a simple CLI tool that compiles *.ts files to the *.qm files. To use this tool run command like this:
1227

1328
```cmd
1429
lrelease.exe your-file.ts
1530
```
1631

17-
In result it generates you `your-file.qm` file that could be used as editor translation, if *.qm file would be putted into `Resources\Translation` folder.
18-
19-
## Suggested workflow
20-
21-
32+
In result it generates you `your-file.qm` file that could be used as editor translation, if *.qm file would be putted into `Resources\Translations` folder.

0 commit comments

Comments
 (0)