Skip to content

Commit d7de44a

Browse files
Update translation docs
1 parent 2146c15 commit d7de44a

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

docs/Images/qt-linguist-map.png

93.6 KB
Loading

docs/Translation.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
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)
716

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

922
## How to use `lrelease`
1023

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

1326
```cmd
1427
lrelease.exe your-file.ts
1528
```
1629

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-
30+
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)