Instructions for translators

See the general Translation document for overall documentation on translation.

Table of contents

Software preparation

For the steps below you need to work on a computer with Git, Perl and Gettext. Select what OS you want to work on from the list below. Other OSs will also work, but you will have to find instructions elsewhere.

Background

The first step in updating the translations is to generate a new template file ("Zonemaster-Engine.pot"). In practice you rarely need to think about generating it as it is generally performed as an implicit intermediate step. If you do want to generate it, the command is make extract-pot.

The translated strings are maintained in files named ".po". Currently there are the following files (and languages):

Execute make xx.po to update the PO file for language "xx". Choose the language code for the language that you want to update. The command will update the PO file with new message ids (msgid) from the source code. This should only be strictly necessary to do when a module has been added, changed or removed, but it it recommended to do this step every time.

Execute make update-po to update all the PO files with new message ids from the source code.

By default the updated PO file will suggested translations for new message ids based on fuzzy matching of similar strings. This is not always desirable and you can disable fuzzy matching by executing one of the following commands instead:

make xx.po MSGMERGE_OPTS=--no-fuzzy-mathing
make update-po MSGMERGE_OPTS=--no-fuzzy-mathing

Github preparation

For full integration with Zonemaster translation you need a Github account and a fork of Zonemaster-Engine. If you do not have a Github account you can easily create one at Github. If you are not prepared to create one, contact the Zonemaster work group for instructions by sending an email to "zonemaster@zonemaster.net".

To create a fork of Zonemaster-Engine:

  1. Go to Zonemaster-Engine repository.
  2. Make sure you are logged in at Github.
  3. Press the "Fork" button.

Make sure that your public ssh key is uploaded to Github and that its private key is available on the computer you are going to work from.

Tools

The PO file can be edited with a plain text editor, but then it is important to keep the database structure of the file. There are tools that makes editing of the PO files easier. When using those, the PO file is handled as a database instead of as a plain file.

Clone preparation

You need a local clone of the repository to work in.

Translation steps

The steps in this section will work for most translation work. We welcome comments on these.

Adding a new language

If you want to add a new language, then follow the steps above with some modifications. Before you add a language contact the Zonemaster project to discuss timeplan and other aspects of the new language. Every language must be update each time a message is added or changed.

Above you found the following step that must now be modified, but run the steps before this step:

cd share
make xx.po

The new language is not there and cannot be updated. Instead you have to create the new language file (PO file). The easiest way is to make a copy of an existing file.