How to create po file?

The translator derives a .po file from the template using the msginit program, then fills out the translations. msginit initializes the translations so, for instance, if we wish to create a Turkish language translation, we'd run

msginit --locale=tr --input=scons.pot

How to translate strings?

A sample entry which is in po file would look like

msgid "scons: Configure: creating %s"
msgstr ""

The translator will have to edit these, either by hand or with a translation tool like Poedit, or Emacs with its editing mode for .po files. When they are done, the entry will look like this:

msgid "scons: Configure: creating %s"
msgstr "scons: Yapılandırma: %s oluşturuluyor"

How to test translations?

The .po files are compiled into binary .mo files with msgfmt.

msgfmt tr.po -o

To test translated file, compile it into binary .mo and copy it to location which it should be in at system. (On unix-type systems, mo files should be in /usr/share/locale/{lang_code}/LC_MESSAGES or /usr/local/share/{lang_code}/LC_MESSAGES) When you run program, the program will display strings in system language, if there is an .mo file for it.

Tips for good translations

Can i be a translator?

You need to be truly bilingual -- fluent in both written English and the language(s) you will be translating into. Casual knowledge of either one will make translating difficult for you, or make the localization you create confusing to native speakers.

You need to be familiar with SCons and Python, as you will sometimes need to read through the SCons code to figure out the best way to translate messages.


i18n/TranslatorGuide (last edited 2009-08-12 20:18:50 by TubaŞahin)