GUI Translation

Revision as of 15:05, 22 March 2007 by Viktor.Pracht (talk | contribs) (Preparation)

This page describes the steps required to translate the AJAX GUI into a new language.

Preparation

Before translating anything, it is recommended that the server and the GUI are installed as described in the installation tutorial. If translations are tested somewhere else, the server is not strictly necessary. In this case, only sections II.1, II.2, II.7, III.1, the Saxon library from section III.2, and section IV.4 of the tutorial are relevant.

The translations use portable object (PO) files from GNU Gettext as file format. There are several tools available to edit the translations:

  • gted
  • KBabel
  • Any text editor, since PO files are simple UTF-8 text files.

At least one of these will be required by the translator.

Generating a translation template

Translations are usually performed by filling out a translation template. This template (a file with the extension .pot) is generated by executing the pot task in Ant:

ant -Dlib.dir=/opt/open-xchange/lib/ pot

The -D switch should specify the same path as in section IV.4 of the installation tutorial. This will produce a file called ox.pot in the i18n directory of the GUI source. This file contains all untranslated text strings found in the source code. The corresponding entries can be either entered manually or merged automatically with an existing translation created for an older version of the GUI. in the latter case, only new and changed strings need to be updated manually. The dedicated tools are a great help for this task.

Installing

After a POT file is translated or merged, it should be saved as ox.LANG.po, where LANG is the language code like e. g. de_DE or en_US. Any directory below the i18n directory of the GUI source will work, but to avoid conflicts with other translations, each translation should be saved as i18n/LANG/po/ox.LANG.po

After that, the new translation must be transformed to JavaScript and copied to its final destination on the web server. this is done by starting Ant again, as described in section IV.4 of the installation tutorial:

ant -Dlib.dir=/opt/open-xchange/lib/ deploy

Testing

TODO: find a way to actually select new languages in the GUI.

Until then, manually finding and replacing the current language setting of a user in the database should work until that user tries to change the language.