Skip to content

Translations

Luca Weiss edited this page Mar 30, 2021 · 9 revisions

Creating a new translation

Run the following command in your terminal:

lupdate -verbose $(find src/ -name "*.cpp" -not -path "src/libopenrazer/*" -or -name "*.h" -not -path "src/libopenrazer/*") ui/*.ui -ts data/translations/$LANG.ts

$LANG should always be "a lowercase, two-letter, ISO 639 language code"!

Then add the file to data/meson.build and data/CMakeLists.txt in the corresponding arrays/lists (marked with # add new languages here!).

Editing a translation

Use Qt Linguist to open the .ts file you want to edit.

A full manual is available on doc.qt.io.

Testing a translation

meson build
cd build/
meson configure -Dprefix=$PWD -Ddatadir=
ninja
mkdir -p razergenie/
ln -sf ../data/translations razergenie/translations
env LANGUAGE=de ./src/razergenie
Clone this wiki locally