translations setup howto?
Dustin Kirkland
kirkland at canonical.com
Mon Jul 27 15:00:33 BST 2009
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:
TEXTDOMAIN="$PKG"
...
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.
--
:-Dustin
Dustin Kirkland
Canonical, LTD
kirkland at canonical.com
GPG: 1024D/83A61194
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20090727/4c7bd2b2/attachment.pgp
More information about the ubuntu-devel
mailing list