What!? I have a blog!? I guess I should say something. 🙂

I recently worked on improving the translations workflow for Entertainer, and hopefully this work will help make Entertainer rock for i18n (which is short for internationalization in the global community because the word is very long, 18 letters long, to be exact).

In the last Entertainer release (0.2), Joshua Scotton did the trailblazing work of adding gettext support to Entertainer. Gettext is a very common method of making an application translatable. For every string that a user sees in the interface, we wrap that string with the _() method in the code. For example, we might have a line that says:

print _(“Hello”)

Entertainer developers could then run a series of commands that will tell gettext to look for the _() method and extract the contents of all method instances it finds into a file called a po template (pot file for short). We upload this pot file to Launchpad translations, which enables our translators to translate the language into their native tongue.

Launchpad lets translators work through a web interface to see a string from the code so they can provide the translation. Optionally, Launchpad will let a translator download the file that contains the mapping from the reference language to the destination language. This file is called a po file. Once the translator updates the po file, they can upload it back to update the translations in Launchpad.

Josh did a great job adding this initial support for translations, but unfortunately, the team dropped the ball on keeping them up-to-date. Since code continues to change, one can deduce that the strings that a user will see will also change over time. Some strings are deleted. Some strings have wording changes. Other strings are added. For technical reasons not worth enumerating, the developers lacked a super simple way to generate a new pot file and upload that file to launchpad to keep the translators in sync with what is happening in the trunk. Because it was non-trivial to update the pot file, our pot file was out of sync with the code for four months. Four months! On a project that is changing as rapidly as Entertainer, that is a very long time.

My recent translation work provides the simple solution that the developers needed. Now, by simply typing `make translations` in a bzr branch of Entertainer, a new pot file will be generated for a developer to upload to Launchpad. With this change, the development team will be much better equipped to provide steady updates to the translators.

If you’re interested in translating for Entertainer, jump over to our Launchpad translations and give us a hand in making Entertainer useful for whatever language you speak. It’s a great way to contribute, especially if coding is not your thing.