It's time to start this blog with an interesting subject: online translation inside CodingTeam. This post is a full introduction to this new feature in the CodingTeam software forge.

As it stands in the release notes for the 0.9.2:

CodingTeam 0.9.2 reintroduces the gettext-based online translation system. It was already in our forge up to the 0.42 but this had disappeared with the full-rewrite of the 0.9. Now, you can easily translate your software online with CodingTeam! The process is simple: you upload a gettext translation model (a .pot file) and then users can translate all your strings in their language. If you already have a gettext translation file (a .po), you can upload it to automatically translate all the strings in the database. When you want to get the translated strings in order to release your software, just export the translation file for all available languages and it's done! And by the way, to prepare the next release, you will import your new .pot file, which will cause the automatical update of your strings database (deleted strings will be deactivated).

This feature is very new and we release it early to get feebacks on this implementation, in order to make it better and better with the time. But here it is, you can now translate your softwares with CodingTeam!

Thus I write this step-by-step howto in order to fully explain this feature, its use and operation to the CodingTeam users and more generally to anyone who may be interested.

Before starting, it is necessary to mention some important points. First, CodingTeam is a software forge, that means that you can do everything to develop your software in one place with varied tools from bugs tracker to source code management. This software can be used, if you have a free software (as in freedom) project, on the CodingTeam.net website!

The method used to implement internationalization (also known as i18n) inside the CodingTeam software forge is based on gettext. It's the GNU library for internationalization and localization. gettext is somewhat a de facto standard to develop multilingual programs. The use of this library is very simple. Programmers put their strings in the gettext function (commonly aliased _). Then, they run xgettext that generates a .pot file wich is a template (it means that this file contains the list of translatable strings extracted from the sources). Afterwards, the translator derives a .po file from this template with msginit or msgmerge and the translation is made in this file. He just send it back to the developer who uses msgfmt to generate a .mo file wich is a binary. These binary files will be used by the program.

With CodingTeam, all the translation work can be made online. The fact is that a lot of people are unwilling to use gettext. Therefore in the context of free software, an easy-to-use appliance can only increase the number of translators who will contribute to your project! And, in an enterprise, it's just necessary to save time.

First step: upload a .pot file.

Just click on the "Administration" link to enter the panel and select your base language.

If you're going to import a template of translatable strings of your programs currently written in English, thus your base lang is English. Just import this file and you're done, strings are now ready to be translated.

English is now hidden in the list of the internationalization homepage. This is because you won't translate strings that are already translated!

Second step: upload a .po file.

Now, you can import an existing translation files if you have it. Just fill this form and this language will be updated.

It's useful in order to maintain on a CodingTeam forge the translation that you've already started elsewhere. The .po import is designed for that and for prehistoric animals that still contribute to translation without using online interfaces.

Third step: translate a string.

The third step is the most interesting of all. Here is the translation string view:

You can see the string that you have to translate and the current proposed translation. If you are registered on the forge, you can add your own proposition (and tag it as translation, correction or reformulation). You can also see where this string is located in the sources (file and line number), this kind of information can be very useful to understand the meaning of a sentence taken out of context.

And below you have the revision history for this translation. Indeed, CodingTeam's internationalization system works as a sum of suggestions, the last one is the translation that ends up being used. Thus, to limit abuse, administrators can delete any suggestions.

When someone contribute to translations, this work is shown in the project's timeline (and therefore in the dashboards). You can also get (through this timeline's entry) a summary of all translation work made in a day by all translaters on all languages.

Fourth step: export a .po file.

Once translation work is finished, you can export the translated .po files. You will just have to compile .mo files from them.

Well done!


Well, you know everything you should know about CodingTeam's online translation system!

But, as I said in the release notes, this feature is very new. It lacks a lot of functionality and can be improved by the time. Some of the needed (and planned!) things to make this internationalization system better are:

  • linking the source code repository and the internationalization system (update on commit, build and commit translation files…)
  • handling plural forms

If you have another great idea, feel free to write it here!