No news to today
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.
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.
| Este artigo foi escrito por igor em janeiro 26, 2010 às 15:58, e está arquivado em English, Fedora. Siga quaisquer respostas a este artigo através do RSS 2.0. Você pode deixar uma resposta ou fazer um trackback do seu próprio site. |


há 7 meses atrás
Nice work, I hope you get this merged upstream eventually
há 7 meses atrás
I’m looking forward to see your work included upstream, that important app is untranslatable for too long time.
há 7 meses atrás
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.
há 7 meses atrás
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.