I18n

From . .. poMMo .. .

Jump to: navigation, search

poMMo uses GNU Gettext as the foundation for its translations. It is truly excellent software, and makes the task of translating a pleasure! Well... perhaps :)

If you would like to contribute in the localization effort, please let us know who you are @ the Translator Forum, and signup (or update your record) as a translator on the poMMo Mailing List. Also be sure to read over the i18n Page.

Contents

HELP WANTED

01:01, 14 December 2006 (CST)

I am currently seeking volunteers to improve and coordinate the translation process. A coordination thread is available in the forums. Besides translating, two things must be done;
1) Increase poMMo's "user friendliness" by making the strings (text) in the program more understandable -- simplistic, short and to the point, and correctly spelled.
2) Optimize the translation files by "normalizing" the strings -- that is, I would like the translation files to have LESS translation strings. Less strings to translate == less work for translators. This is accomplished by finding similar stings and combining them into one. It is best to use a po editor on the .pot file (see below) for this work, as the editor will organize all the text in poMMo in a single, navigable view. As example; if you notice that the translation file includes "subscribers:", "Subscribers:", and "Subscribers" as translation strings, please report this. These strings can most likely be combined as "Subscribers" -- reducing the number of strings to be translated by 2! Similar phrases such as "Proceed" and "Continue" should also be combined.
Please contact me or post in the forum if you're interested in helping! Thanks.

poMMo Translation File

The latest translation file (pommo.pot) is kept in a Subversion repository under the aardvark-development branch. This repository is also updated with your contributed locale's ".po" files. In general, before a release, the .pot file will be updated and notice sent to our Mailing List requesting translation.

You may download the latest .pot or your locale's updated .po file through the web via the Aardvark-development Repository;

Also, the .pot file can be obtained in the /language directory of the poMMo distrubtion.

Resources

Recommended .PO Editors

Translating

We'd love to have you help translate! Please familiarize yourself with gettext, and sign up as a translator on our Mailinglist and Translator Forum. Currently "vi" and poEdit are being used by our translators to do their thing. If you prefer a different editor, let us know what you are using so we can include it in this list.

As bMail development continues, the .POT file will be updated periodically to reflect changes in the program. You can grab the latest "official" .POT file from this page. This file can easily by synchronized with your language's existing .PO file so that you only need to translate what has changed. Your editor (or the gettext tools) handles the synchronization process.

Summary

With the PR11 release comes the beginning of our internationalization efforts. The goal of this effort is to make it as easy as possible to localize *all* default text to a language. We have chosen to use the defacto standard of i18n frameworks, GNU Gettext as the basis for translations. This system is very efficient -- for BOTH translators (using eastablished and intuitive synchronizing editors) and the server (gettext is very fast in that it uses compiled machine code as the translation table). PHP Gettext is used in case gettext is not compiled into PHP or the selected language's locale does not exist on a server -- which happens quite often with "virtual" server hosting.

Working With Gettext

Creating translations under gettext is a three part process. First, a file is created containing all the strings(text) which need to be translated. This is called the global .POT file, and is created using scripts which scan the program's source for strings passed to the translation function. The .POT file contains all strings to be translated as well as what filename and linenumber the string was extracted from. It is human readable (ie. in plain text), and its generation process accounts for duplicates so you don't end up translating the same string twice.

Once the .POT file is created (or updated), the translators download the file and add their translations to it. The resulting work is saved as a .PO file. The .po file exactly resembles the .pot file, except that it includes a language's translations. There are editors which help in translating the .pot file to a .po file. They do things like synchronize the translators .po file with a new .pot file, attempt to automatically fill in values using "memory", and highlight whitespace. poEdit is a nice multiplatform gettext editor.

After the translator completes their .po file, it is "compiled" into a .MO file. A .mo file is a binary file, optimized to be read by a machine and not humans. This results in gettext providing lightning fast translation lookups. The .po and .mo files are then sent to the developer so that they can be included in the next version of bMail.

Testing Translations

You can see your translations in the program by copying the compiled .MO file to poMMo Root/languages/locale/LC_MESSAGES/pommo.mo, and then configuring your config.php to use the locale. For instance, if you'd like to test the German (de) localization, copy the de-pommo.mo to /pommo/languages/de/LC_MESSAGES/pommo.mo and set bm_lang to 'de' in config.php
NOTE: Your .PO editor should be able to compile the .MO file from the .PO one.

Notes for Translators

When translating, you will come across symbols like; %1, %s, %d, and %2$s in your strings. These reference external variables, and will be "expanded" when the program is run (ie %s could become "Joe"). Don't modify these symbols, or alter the whitespace around them. You can change the posistion of these, however, and even re-arrange the numeric ones safely.
DEVELOPMENT NOTICE --> poMMo is still in a state of extreme development; with this comes rapid change -- including translation strings. I encourage you to take a shot at translating the .POT anyway... it will help to familiarize yourself with the process. More importantly, you'll likely come across issues (such as text being displayed improperly, or misspellings) that need to be addressed. Please report them, and any ideas you have to make things better.
Retrieved from "http://pommo.org/I18n"
Personal tools