Automate Pseudolocalization

Background

In order to test Mifos to see if all the messages displayed can be localized (translated into other languages) we use a fake localization (pseudolocalization) that makes it easier for us to see which strings are not translatable and fix them so that they can be translated. This pseudolocalization currently needs to be updated manually when new message strings are added and the properties files with the pseudolocalization are stored in version control. This means that time has to be spent on an ongoing basis to maintain the pseudolocalization and that the pseudolocalization unnecessarily clutter the list of resources for Mifos.

The goal of this project is to remove the pseudolocalization from version control and get the pseudolocalization to be generated automatically at build time.

Status - Completed

Complete

Contact

Please email the mifos-developer list if you are interested in helping on this project.

Mentor

Van Mittal-Henkle

Current Volunteer(s)

Terminology

pseudolocalization: a fake localization of application text messages that makes it easier to find and fix text cannot be localized.

Time Estimate

10-30 hours depending on experience

Prerequisite experience

  • Java
  • familiarity with or eagerness to learn Maven

Details

Pseudolocalization, is the term we use to describe taking the english text for a message and created a fake localization. An example would be taking the text "Submit" and generating the pseudolocalization "@@@Submit^^^" from it. By adding characters before an after text it allows us to see when there is text that does not come from a properties file.

Currently when messages are added to a properties file, we need to regenerate the pseudolocalization of that properties file by hand. We do that by using the utility class org.mifos.core.PseudoLocalizationGenerator that is in the "core" module of Mifos.

This class generates a pseudolocalization properties file from a single properties file.

Because it is unlikely that Mifos will ever need to be translated into Icelandic, we chose the locale for the Icelandic language in Iceland (is_IS) to use for our pseudolocalization locale.

Currently there are a bunch of xyz_is_IS files in the application module under src/main/resources/org/mifos/config/localizedResources.

We would like to remove all these xyz_is_IS.properties files and instead have the PseudoLocalizationGenerator run on all English properties files as part of each build to generate the xyz_is_IS files on the fly.

To generate the pseudolocalization during the build, one approach would be to use the exec-maven-plugin to run a script or java program that would loop over all the english properties files and generate the corresponding xyz_is_IS files. We probably don't want to do pseudolocalization on every build. So we would put the generation in a profile so that only the build server would need to run it on pseudolocalization test builds.

Steps