Skip to content

Commit 40b5e76

Browse files
committed
Document how to translate and test translations
1 parent 6967f8d commit 40b5e76

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/translations.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Translations
2+
3+
Translations are stored in .ts files in the [src/translations/](../src/translations/) directory.
4+
5+
## Adding a new language
6+
7+
- Add a .ts file to the `TS_FILES` variable in [src/CMakeLists.txt](../src/CMakeLists.txt)
8+
- Run `make lupdate` in the build directory to create the .ts file
9+
- Translate the content of the .ts file with Linguist
10+
11+
## Testing a translation
12+
13+
- Build and install the app, preferably in a directory where you don't need to be root to install. This example assumes you install it to `$HOME/tmp/nanonote-inst`:
14+
```
15+
mkdir build
16+
cd build
17+
cmake -DCMAKE_INSTALL_PREFIX=$HOME/tmp/nanonote-inst <path/to/nanonote/tree>
18+
make
19+
make install
20+
```
21+
22+
- Run the app, possibly with the `LANGUAGE` variable set to force the language:
23+
```
24+
LANGUAGE=<the_lang_to_test> $HOME/tmp/nanonote-inst/bin/nanonote
25+
```
26+
27+
- If something is wrong: fix the translation, run `make install` and try again

0 commit comments

Comments
 (0)