1 The localization works as follows:
3 1) KDE scripts set up a special environment which then runs the top-level
4 Message.sh script which generates the trojita_common.pot file "somewhere".
6 2) Translators somehow turn the trojita_common.pot file into
7 [some-path-in-KDE-SVN]/$LANG/[stuff]/trojita_common.po files. From Trojita's
8 point of view, all of that happens by pure magic.
10 3) When localization is about to be used, the produced .po files are downloaded
11 into the po/ directory and renamed to trojita_common_$LANG.po. This MUST happen
12 before qmake is run (or rather "qmake MUST be re-run after the contents of po/
13 changes). You can use the l10n-fetch-po-files.py script for that (run from the
16 4) The build system converts the .po files into .ts and these into .qm, which
17 are then ready to be used by QObject::tr. The .qm files are installed into
18 something like /usr/share/trojita/locale.
20 5) The .qm files are loaded at runtime by QTranslator, either from the
21 system-wide directory, or from path-to-binary/locale.
23 That's all, and it works!