Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).

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

#: SConf.py:112
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:

#: SConf.py:112
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 scons.mo

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.

References

http://en.wikipedia.org/wiki/GNU_gettext

http://codex.wordpress.org/Translating_WordPress

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