Home 

Chapter 9. Translation

J. Rundholz

Table of Contents

Basics
How to get your po file
Translating
Test your work
Merging an old po file with an updated pot file

This chapter should give any one (in particular people who are not developers) a first overview on how they can translate KMyMoney into another language. The information given here is not only valid for KMyMoney but as serves for the translation of any KDE project.

Basics

First of all you need to get the required files. There are two types of files which might be of interest to you. Files ending in .pot and files ending in .po.

Files ending in .pot are the source for the translation. They only contain the English texts you need to translate and are generated for each release of the project. The one for KMyMoney is named kmymoney2.pot. The po file contains the English and the translated text, e.g. German. There might be two cases: The first case you can't find a po file for your language or the second there is already a po file for your language available. In the latter case you can already start KMyMoney in your language, but may be the translation is not complete or you simply want to improve the translation. Now you need to get these files from the project's CVS repository. You don't need to worry what exactly CVS does, for a translater it is more or less only a file system from where you can download the files you need. For KMyMoney you can either go to the CVS page and call the CVS web front end or follow this link. I would recommend to download the pot and po file of the latest stable version (at the moment 0.8), not any older files and not the one which is under development at the moment. In order to test your translation later you should run the same version on your box. For the actual translation I recommend the program kbabel. Other people use emacs, as usual it is just a personal choice. All examples given here are based on kbabel.

How to get your po file

As explained earlier the actual translation is done by modifying the po file. The next step is to create a po file to start the translation.

No po file for my language available

That's the most simple case: Rename kmymoney2.pot to lang.po where lang is your language code e.g. de for German.

po file for my language available

In case you already have a language file it is advisable that you check how the English text entries in that file differ from the English texts in the pot file. Maybe for some reason the pot file is further developed than the po file. In this case even though you would translate the whole po file you would still see some English texts in KMyMoney. If you know that this is not the case, i.e. your po file has all the latest English text inside, you can use this one for translation. The minimum check you should perform is to compare the number of messages. Just load the po and the pot file into kbabel and you see how many messages you have in each file.

In case that both files differ you should merge them (since you don't want to lose someone else's work). Merging can be done using kbabel very easily .

  • Copy kmymoney2.pot to lang-new.po and open this file with kbabel.

  • In kbabel choose Tools Rough translation from the menu. A dialog pops up. Choose the following options:

    • What to translate::Untranslated Entries

    • Options::Mark changed entries as fuzzy

    • Dictionaries::Use::PO Compendium

    Don't select anything else.

  • Now press the "configure" button. In the next dialog enter the path to your already existing po file. Furthermore set the options:

    • Options::Case sensitive

    • A text matches if::Equal to searched text

    Don't select anything else.

Caution

The original po file could have entries marked as "fuzzy", that means that the translation might be not very good or even horribly wrong. After you did this merger process you lose this information. It might be a good idea to translate all fuzzy strings in the old, unmerged po file before you do this explained merging process.