Even at the time, we knew that the story wasn’t complete: you still had to somehow generate your translation templates (in the form of GNU gettext’s .pot files) and get them into your Bazaar branch before people could start translating your project in Launchpad.

However, we also knew that automatically generating translation templates was a big task.

Now, though, I’m pleased to say that Launchpad can automatically generate the templates on your behalf.

How to get it all set up for your project?

Automatic translation template generation relies on something called intltool. You’ll need to be familiar with intltool before you can get started with automatic template generation.

You first need to enable your branches for intltool and then set up a translation template import fromn the Bazaar branch that is linked to your project’s release series.

This means that, provided your branch has proper structure, you don’t even have to keep the POT file committed anymore (as a matter of fact, it’s better if you don’t). If your branch is not recognized as intltool branch, everything will keep working as before.

At this time, limits to what branches we consider intltool based are pretty strict: it has to have a POTFILES.in file in each of the template subdirectories, and be able to derive the domain name from MakevarsDOMAIN variable or Makefile.in.in, configure.ac or configure.ingettext_PACKAGE variable (with very limited substitution supported). This will be further improved in the future, but plan is to support much more different layouts than just the intltool one.

We’ll be writing more about how to make the most of this in the coming weeks.

This entry was posted by Данило Шеган on Tuesday, May 4th, 2010 at 9:53 am and is filed under Translations.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

4 Responses to “Automatic generation of translation templates”

The gnome-doc-utils layout is not supported yet (it’s an entirely different problem). Only intltool layout and re-generation of templates is. FWIW, this probably won’t really take effect until later tonight or tomorrow because of backlog branch-scanner is processing (all Maverick branches) and because we forgot to enable it.

Semi-OT question: is there a way to get .pot files for the language-pack-* packages from Launchpad, without logging in? I’ve noticed that language-pack* source packages only contain .po files with actually translated strings (presumably to save CD-ROm space?); but I’d like to get .po or .pot files also with untranslated strings. Any idea how to get these?