Translation:Create Translation Files

For the creation of translation files, you can use the translation_utils.py file from within the scripts folder.

There are different command line options possible. For short description call: user@linux:~$ python translation_utils.py -h

For getting more detailed output you can add the option -v

The standard procedure does not need any parameter, but it set the parameters -dpug user@linux:~$ python translation_utils.py

Available options are: -d -> This will download all the translation files, which are available at the Pootle Server (this requires a internet connection)

-c -> Creation of new translation file, Parameter: language (e.g. "en_GB")

-p -> This will generate a new openlp.pro file The generation wil work through all the python files and add them to the .pro file Also all existing translation files at folder ./resources/i18n will be added But all files starting with "hook-..." and "test_..." will be ignored as well as all files at path "./scripts" and "openlp/core/test" and also the file "setup.py" Further files or folders which should be ignored can be added in the lists: ignore_files and ignore_pathes

-u -> This will create or upgrade the ts-files (translation files)

-g -> This will generate the resulting *.qm files for all ts-files

-v -> This option create a more detailed output, what the script is done

Example for adding a new translation for OpenLP.(e.g. "en_GB") - go to the ./openlp/trunk/script path and start user@linux:~$ python translation_utils.py -c en_GB -pu This will create the new language, generate the openlp.pro file and update the translation file with latest source strings - load up the new *.ts file to the HQ-Server. (or asking the admins to do this)