Skip to content

Translations

Luca Weiss edited this page Jun 1, 2024 · 9 revisions

Creating a new translation

Run the following command in your terminal:

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

To clean up vanished translations, add -no-obsolete parameter.

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

Then add the language to data/translations/meson.build.

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 setup builddir/
cd builddir/
meson configure -Dprefix=$PWD -Ddatadir=
meson compile
mkdir -p razergenie/ libopenrazer/
ln -sf ../data/translations razergenie/translations
ln -s ../subprojects/libopenrazer/translations libopenrazer/translations
LANGUAGE=de ./src/razergenie

Note: Some strings (such as effect names and lighting locations) are part of libopenrazer and need to be added there.

Clone this wiki locally