translations setup howto?

David Planella david.planella at
Tue Aug 11 09:26:24 BST 2009

El dl 27 de 07 de 2009 a les 09:00 -0500, en/na Dustin Kirkland va
> Howdy-
> I am looking for a somewhat comprehensive guide on how to generically
> i18n a project/package, (specifically, ecryptfs-utils).
> I know that I need varying degrees of:
>  * gettext, xgettext calls in the shell, python, and C code
>  * a po directory with some stuff in it
>  * hooks in the build system
>  * rules in the make file
>  * some setup in Launchpad, several rounds of review, eventually
> (hopefully) this bit will be "approved" by the powers that be.
> I've crudely configured this in other packages (see: byobu) by emulating
> bits and pieces of code from the archive.  But I feel like there should
> be a bit more "science" here, as far as internationalizing a package or
> project goes.  A step by step guide would be nice, from the perspective
> of a developer and maintainer.  Something like:
>  1) Comprehensively go through your code.  Prime your setup with (e.g.):
>    * Python:
> gettext.bindtextdomain(PKG, SHARE+'/po')
> gettext.textdomain(PKG)
> _ = gettext.gettext
>    * Shell:
>   ...
>  2) Replacing string printing with (e.g.):
>    * Shell: xgettext
> echo `gettext "Select a screen profile: "`
>    * Python: gettext.gettext
> _("Toggle status notifications")
>  3) Add support in your build system by doing ... (?).  Edit your
> debian/rules accordingly (e.g.)
>  4) Setup translations in Launchpad by doing (a, b, c)
>  5) Pull the translations back into your project by doing (?)
>  6) Test the setup by (?) installing some other language pack and
> baffling yourself with a foreign tongue :-)
> Some pointers would be appreciated.

Hi Dustin,

Sorry for the delay in replying.

As talked on IRC, the short answer is: there is no comprehensive guide
which covers all the aspects you are mentioning, in particular the
Ubuntu/Launchpad bits are either spread around or not documented.

However, the two following resources should help you for now. The first
one covers the developer guidelines when internationalising GNOME
projects and also contains links to the gettext documentation. The
second one describes the translation lifecycle of Ubuntu translations
from the moment they are extracted from packages and imported into
Launchpad until they are released as language packs.

I have made it one of my additional objectives in this cycle to provide
such a guide on internationalising a package/project for Ubuntu, but
I've just started on this. Daniel and I started a page in the Ubuntu
wiki for this purpose, but it is still very crude at the moment - which
is why we haven't announced it yet. It needs to be properly structured
and expanded, but in case you'd like to have a look at it, it's here:

For any questions, feel free to ask me. Those questions will certainly
be useful for knowing what needs to be put in the guide.


David Planella
Ubuntu Translations Coordinator

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: =?ISO-8859-1?Q?Aix=F2?= =?ISO-8859-1?Q?_=E9s?= una part
 d'un missatge signada digitalment
Url : 

More information about the ubuntu-devel mailing list