Latest revision as of 14:17, 17 September 2010

Contents

Translations are currently only done in the e35 and in the e4 branches. e5 will follow later. Right now we use custom translation scripts, but for e4 and e5 we eventually plan to switch over to the KDE infrastructure to do all the work for us, after the Git migration is complete.

Apart from the setup needed below, please also follow the setup instructions in the README file so that the scripts will work properly. It is important to follow those instructions, especially about setting up environment variables. You also need to install Lokalize, which is the program used to edit .PO files. These .PO files contain the actual translations for each language. The translation scripts will create updated .PO files by scanning the source code and the documentation and extracting text that should be translated out of them.

After the initial setup is complete, you'll see the PO files in the l10n-kde4/de/ (e4) and in the kde-l10n/de/ (e35) directories. There is also a templates/ directory with POT (PO template) files. As soon as text strings in the source code or in the documentation change, the PO and POT need to be updated. This can be done by simply calling the following bash functions:

e35: update_e3_translations

e4: update_e4_translations

The scripts will automatically update your source code checkout so that you don't get outdated translations. Running these can take a few minutes. Afterwards, the PO and POT files should be up-to-date and you can edit the PO files to add the translated strings.
The update scripts will show you at the end which PO files have outdated translations and need to edited.

The PO file editor for KDE is called Lokalize. Simply start it and open the PO files you want to update. The PO files you need to edit are located in the following directories:

e35:

kde-l10n/de/messages/kdepim/: Strings in the actual applications
kde-l10n/de/docmessages/kdepim/: Strings in the documentation handbook

e4:

l10n-kde4/de/messages/

Lokalize lets you jump to the next untranslated or to the next fuzzy message you need to translate, simply use that, add the translations and save the PO file. For more advanced features, and for a general guide to translating, see:

Special attention should be paid to crypto terms, they should be as consistent as possible. See The GPG4WIN phrasebook for some standard terms to use. For other terms, try to be consistent with the rest of the German KDE translation. It is often useful to use Lokalize to see what the translation of a certain term is in other places, so that the same translation can be used.

To double-check that you don't have missed some strings, run the function find_untranslated in the kde-l10n or in the l10n-kde4 dir. Afterwards, double-check that you have made the correct changes by viewing the diff with the po_diff function.
Now you can commit the changes to the PO files and to the POT files by simply running

svn ci -m "SVN_SILENT update translations"

in the kde-l10n or in the l10n-kde4 directory.
After a successful commit, the translations are done.

Note that after committing, no changes in the source code can be made that change text strings, since otherwise the translations will be outdated again. Therefore, we have to avoid changing text strings in the source when the translations are committed, but the tags are not yet made. This needs coordination between the translators, the developers and the person doing the tags.

After finishing the translations, one might want to directly test them, to see if they work as expected.
First of all, you should install the current SVN versions of kdepim and kdepimlibs, as the translations of course need up-to-date applications that use the translations. After installing those, the translations itself need to be installed. For this, the PO files first need to be compiled to MO files, which are then installed. This can easily be done by running this function:

e35: install_e3_translations

e4: install_e4_translations

Before starting the applications, the KDE_LANG environment variable needs to be set up so that the correct translations are used. Simply type

export KDE_LANG=de

before starting the PIM applications from console. Sometimes it might be necessary to kill the running kdeinit/kdeinit4 process before the translations can become fully active.