-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to translate and test translations
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |