Translating Antville

Tobi Schäfer edited this page Apr 6, 2015 · 2 revisions

How to translate Antville into your language.

Prerequisites

If not already done so, please download and install the application Poedit, available for Linux, OS X and Windows:

http://www.poedit.net/download.php

Creating the Translation File

Run Poedit and follow the depicted path. (Note: If your language is already available as PO file in the i18n directory please jump directly to the section about translating a PO file.)

The file antville.pot is located in the Antville installation directory under apps/antville/i18n or you can get the latest version from the Subversion code repository (ie. by right-clicking the link and downloading the file to your local hard disk).

After selecting the file, click Open. PoEdit currently confirms your action with a rather unorthodox message dialog:

(It actually means everything is alright, really. Update: Later versions do not do this, anymore and fortunately.) Afterwards, the settings dialog is displayed.

Please fill in all the fields. As you will be the sole member of a translation team most of the time (or so they say), you can also enter your name and e-mail address. The most important information you should enter, though, are the language and country ISO codes.

Also check that you have entered UTF-8 as charset (also for the source code) and the string defining the plural forms is exactly as displayed in the screenshot:

nplurals=2; plural=(n != 1)

Now click OK and save the file with the language ISO code as filename plus the .po suffix:

(You might have noticed that “cn” is not the correct language ISO code for China – it should be “zh”.)

Translating the File

Translating message in a PO file is pretty straightforward. You pick a message from the list in the upper part of the PoEdit window and enter the translation in the lower form field (or fields, resp. in case of a plural form). Untranslated messages appear in bold font, newly translated ones are marked with a little star icon.

If a message contains placeholder patterns (like {0}, {1}, {2} and so on) please enter these exactly as given – of course at a semantically meaningful position.

Note: It might not always be easy to understand and translate such messages. If in doubt feel free to contact the Antville developers.

Some messages come in singular and plural form and need corresponding translations:

If you finished your translation save the file again.

Last but not least you should return the translated file to the Antville Project, either via e-mail or upload to http://translate.antville.org. If you should become a very busy and successful translator of Antville files you even could apply for write access to the Subversion code repository.

Updating the Translation File

Once in a while new messages will be added to Antville and thus an update of the translation file will be necessary. In order to do this first open the translation PO file as explained before. Afterwards select the Updating from POT file... command from the Catalog menu:

Select a new version of the antville.pot file:

PoEdit shows a summary of the update in a dialog window:

Now you can resume translation of the file.