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.

Category(s): English, Fedora
Tags: ,

4 Responses to Playing with gettext and intltool

  1. Nice work, I hope you get this merged upstream eventually

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

  3. 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.

  4. 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.

2 Responses in other blogs/articles

  1. [...] Playing with gettext and intltool « Igor Pires Soares [...]

  2. [...] Playing with gettext and intltool « Igor Pires Soares Categories : acting [...]

Deixe uma resposta

O seu endereço de email não será publicado Campos obrigatórios são marcados *

 

Você pode usar estas tags e atributos de HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>