Playing with gettext and intltool

I have been learning how to use gettext and intltool in order to get some code internationalized. At first I thought it would very difficult to learn and get practical results but in fact the i18n libraries and tools are easy to work with.

The first choice was how to test them in  a useful way and so I chose to do it using the Preupgrade code. Although I’m not very familiar with Python code I did this because this software is not internationalized yet and because it is “real code”, not just a Hello World example. I guess this is the greatest thing about open source software, you can just dig in and do whatever you want to and give it back, so IMHO this is a good place to start and a patch can come later. Another interesting thing about gettext is that it works pretty much in the same way for other languages. This is good because I intent to collaborate providing i18n support for other programs as well.

Preupgrade speaking some Brazilian Portuguese

So far I extracted 80 strings into the .POT file but I was not able to get the dialog titles internationalized yet, although they are marked as translatable in the Glade XML file. Once I fix this it will be good to go and I’ll find out how to get the i18n support automatically built into the package.

6 thoughts on “Playing with gettext and intltool

  1. I’m looking forward to see your work included upstream, that important app is untranslatable for too long time.

  2. Awesome! Thanks so much for looking at this – the lack of i18n support was always one of my biggest regrets about preupgrade.

    Trust me – the “upstream developers” are very, VERY interested in your work here. Let me know if you need any help getting patches included upstream.

  3. Pingback: Castlefest 2008 Role Playing :: LARP Costumes, LARP kit, LARP FTW
  4. Pingback: only playing :: LARP Costumes, LARP kit, LARP FTW
  5. Thank you all for the comments! I reviewed the code and got a few more strings and I think it is good to go now. I will open a bug report in order to get it patched.

Leave a Reply

Your email address will not be published.Required fields are marked *