First, make sure you have installed the gettext
package. Also, you would need to install language pack for Gnome for your language, e.g. language-pack-gnome-XX-base
for Debian/Ubuntu.
Here are the steps to add/update a translation (you should run all scripts from the source root):
Get an up-to-date copy of the source files. Preferably, make a fork on GitHub and clone it locally on your machine; this way you can later make a pull request to the main project.
Run ./tools/po-update.sh <language>
; it will create/update the file
./po/<language>.po
.
Edit ./po/<language>.po
with your favorite editor (just make sure it saves
the file with the UTF-8 encoding). For each string in English (msgid), edit
the translation (msgstr); if you leave msgstr empty, the string will remain
untranslated.
Alternatively, you can use the excellent Poedit or Lokalize.
Run ./tools/po-compile.sh
. It will bring up-to-date all the compiled
language files, necessary at runtime.
Start Solaar (./bin/solaar
). By default, it will pick up the system language
from your environment; to start it in another language, run
LANGUAGE=<language> ./bin/solaar
.
To edit the translation iteratively, just repeat from step 3.
If the upstream changes, do a git pull
and then repeat from step 2.
Before opening a pull request, please run ./tools/po-update.sh <language>
again. This will
format and sort the translation file, and ensure a minimal diff when updating
a translation.
Some of the languages Solaar has been translated to are listed below. A full list of available translations can be obtained by checking the /po
folder for translation files.