Translators Guide

From Unknown Horizons

Jump to: navigation, search


It's now possible to translate Unknown Horizons into any language with latin characters. This guide shows how to create your own translation. We recommend to use Poedit to edit the files. This is a simple program for all common platforms.

Contents

Finished translations

  • <flag> Start date (Current version)
  • Image:Flag-Gb.png 2009-04-11 (2009-04-11)
  • Image:Flag-de.png 2009-04-11 (2009-04-11)
  • Image:Flag-no.png 2009-04-15 (2009-04-15)
  • Image:Flag-pt.png 2009-05-04 (2009-05-04)
  • Image:Flag-fr.png 2009-05-07 (2009-05-07)

Requirements

  • working En/SVN installation of Unknown Horizons
  • simple texteditor

Create templates

Templates are the first building block for gettext. They are basically a list of strings that could be translated. To create the most up-to-date templates run the following in unknown-horizons's trunk directory:

pygettext -d unknownhorizons -p po .

Alternatively you could use the version from trunk http://unknown-horizons.org/trac/export/HEAD/trunk/po/unknownhorizons.pot which should be reasonably up-to-date

Start a new translation

Starting an translation for an language currently not available for Unknown Horizons is done by copying po/unknownhorizons.pot to po/$LANG/LC_MESSAGES/unknownhorizons.po

Updating existing translations

After strings changing in Unknown Horizons, translations may get outdated. If you have an template newer that the translation you are interested in, you can update the translation File with

msgmerge -U po/$LANG/LC_MESSAGES/unknownhorizons.po po/unknownhorizons.pot

Working on translations

After creating or updating the .po File you'll want to work on the translations. The .po Files in LC_MESSAGES are textfiles in the special gettext format. You can either use your favourite Text editor to edit them or use dedicated software like poedit.

Finishing off

To load the translations into Unknown Horizons it is necessary to convert them into the binary format. this can be done using the msgfmt command:

msgfmt po/$LANG/LC_MESSAGES/unknownhorizons.po -o po/$LANG/LC_MESSAGES/unknownhorizons.mo

When this has finished start Unknown Horizons and check wether the new Translations are available!

Make them official

After verifying your translations are good, please submit them so we can include them for the public. This is done best using our Trac: Add a new Ticket with Component set to Translations and add you .po Files as Attachment.

Personal tools
Unknown Horizons
Design Document