Home > Developers > Wiki > Admin Online Translation HOWTO
Views


Developer guide for working with Mifos internationalization, specifically as relates to making translation files work with the online translation tool.

Goals

  • strictly limit the proliferation of resource bundles to ensure manageability
  • support an extensible translatable string dictionary format to make life easy for translators

Overall i18n Architecture

Following the Cheetah i18n architecture guide, "master" keys and translatable strings are in Java .properties format resource bundles. These .properties files will not contain underscores in their filenames. These files will be stored in source code version control.

Language-specific translations will also be stored in source code version control, but only in .po (portable object) format, like LOCALE/bundlename_LOCALE.po. Language-specific Java .properties format resource bundles needed by Mifos to display the application in a language other than the default will be generated during the build.

Required Software

General Guidelines

  • Before working with translation files, perform an update to pull the latest changes in source control into your working copy.
  • Use detailed log messages when committing. Mention why you made the change, refer to related issues, and link to related mailing list threads.
  • If you are doing anything directly on the .properties files, please notify the PM managing Online Translations as this might affect any existing translation work being done.

Converting legacy bundles

Create the directory to store .po files (for example, "fr") in mifos/src/org/mifos/config/localizedResources. Use capture_initial_locales.sh to convert legacy Java .properties-based resource bundles to .po format.

Follow with locale_sync.sh to clean up duplicate msgctxt strings and add fuzzy translations.

Adding new keys

  • add key and default translation to appropriate .properties file
  • run locale_sync.sh
  • commit default .properties and LOCALE/*.po files

New .properties files will also be picked up by locale_sync.sh, but care should be taken to only add new default/master translations when absolutely necessary (see Goals).

Adding new languages

  • Locales are either made up of a single language code (for instance, en, for English language), or a combination of of a language code and a country code (en_US, for United States English). (Here is the Sun Java Locale page which has more info.)
  • create directory using the code for locale.
  • run locale_sync.sh
  • commit LOCALE/*.po files
  • a Pootle administrator also needs to add new translation files for this language to the Pootle server via the Pootle admin UI; make a request on the mifos-developer mailing list for this.


Grameen logo