Prev (Compile Instructions for Windows) | Home | Manual | () Next


HOWTO enable/disable source translations extraction

We now have the ability to choose when to update (extract) the translations from the sources files within CMake. It’s controlled by the UPDATE_TRANSLATIONS CMake command line option. It defaults to OFF. Translations are always compiled (.ts to .qm)

To update the translations just set the CMake command line option UPDATE_TRANSLATIONS to ON. E.g.:

cmake -DUPDATE_TRANSLATIONS=ON ..
make

The translations are extracted and also compiled. To return to the compilation only mode just set the UPDATE_TRANSLATIONS option to OFF. E.g.:

cmake -DCMAKE_UPDATE_TRANSLATIONS=OFF ..

Warning: For all other generators than Makefile: When UPDATE_TRANSLATIONS is enabled a clean command will also clean the generated .ts files. So, after extracting the translations sources it’s advisable to set UPDATE_TRANSLATIOS to OFF right away.

HOWTO translate qmapshack.desktop (UNIX like only)

The qmapshack.desktop file contains the info that appears in the panel menus. It can also be translated. The process is different from the .ts files tough. Let’s say we want to localize it to German (de):

#Translations
Name[de]=QMapShack
GenericName[de]=GPS Daten- und Kartenverwaltung
Name=QMapShack
GenericName=GPS device mapping utility

Prev (Compile Instructions for Windows) | Home | Manual | () Next