Skip to content

Commit

Permalink
Document how to translate and test translations
Browse files Browse the repository at this point in the history
  • Loading branch information
agateau committed Sep 7, 2023
1 parent 6967f8d commit 40b5e76
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/translations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translations

Translations are stored in .ts files in the [src/translations/](../src/translations/) directory.

## Adding a new language

- Add a .ts file to the `TS_FILES` variable in [src/CMakeLists.txt](../src/CMakeLists.txt)
- Run `make lupdate` in the build directory to create the .ts file
- Translate the content of the .ts file with Linguist

## Testing a translation

- 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`:
```
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/tmp/nanonote-inst <path/to/nanonote/tree>
make
make install
```

- Run the app, possibly with the `LANGUAGE` variable set to force the language:
```
LANGUAGE=<the_lang_to_test> $HOME/tmp/nanonote-inst/bin/nanonote
```

- If something is wrong: fix the translation, run `make install` and try again

0 comments on commit 40b5e76

Please sign in to comment.