Gettext support for pgAdmin3 and the web site

Поиск
Список
Период
Сортировка
Искать

Gettext support for pgAdmin3 and the web site

От:
Jean-Michel POURE <jm.poure@freesurf.fr>
Дата:
Hi Andreas,

Just for information, do you think it would be difficult to add Gettext 
support to pgAdmin3? We could run an extract script on Snake and publish the 
.po files for translation everyday. I can handle po files merges for the team 
if you need someone.

A good example of translation process can be found on 
http://poedit.sourceforge.net/translations.php

poedit uses wxGTK against GTK2, which fully supports Unicode when compiled 
with the following options:

--enable-gtk2 --enable-unicode (not sure, I guess).

pgAdmin web site can be internationalized quite easily using Php and Gettext. 
Frankly, I think PhpPgAdmin translators would love to translated pgAdmin3.

If you need me to look at php source code and modify it in consequence, just 
let me know. 

Cheers,
Jean-Michel POURE

Re: Gettext support for pgAdmin3 and the web site

От:
Andreas Pflug <Andreas.Pflug@web.de>
Дата:
Jean-Michel POURE wrote:

>Hi Andreas,
>
>Just for information, do you think it would be difficult to add Gettext 
>support to pgAdmin3? We could run an extract script on Snake and publish the 
>.po files for translation everyday. I can handle po files merges for the team 
>if you need someone.
>
It's not difficult, just going through the sources. gettext is supported 
by wxWindows, so we should go ahead. I wonder if the wxrc lib already is 
gettext aware. If not, after loading the resource it would be necessary 
to loop through all controls and push them into the translator; not too 
dificult either.

I don't think it's a good idea just to analyze the binary in total; 
there are way too many non-translatable strings in it.

So there are these steps to perform:
- initialize gettext
- replace all translatable wxT() with _() in the sources
- push all *.xrc into the string extractor
- adding the gettext processing to Makefile
- adding the gettext processing to VC project.

I'll start this; as long as gettext isn't active, the _() macro can be 
redefined as wxT().

I've seen that wxGetTranslation(), the gettext equivalent of wxWindows, 
will use and return char*, not wxChar*. I wonder if this will give 
problems if we are switching to unicode.

Regards,

Andreas

FAQ