[GRASS-dev] Tcl and shell script option translation

Cedric Shock cedricgrass at shockfamily.net
Sat May 6 14:10:34 EDT 2006


Hi,

I've made some improvements to the localization system.


Tcl files get their G_msg stripped by xgettext for translation, translations 
are installed where G_msg finds them. This is pretty straightforward.


Translation of script options:

g.parser has a new -t switch (before filename, can't interfere with other 
parser behaviours) that outputs the translatable strings in the options of a 
script. g.parser also gettext()s the same strings when running normally.

Script.make runs g.parser to get the strings, writes them to 
locale/scriptstrings/_______.c fake c files.  The regular rules for searching 
c strings pick up here and find these all as grass module strings.  (These 
are cleaned out on "make clean".

There is one gotchas to this all. "make" must be run by the translator (or 
someone else to prepare templates for translation) before translation instead 
of just "make pre".


It might also be wise to make a blitz of internationalizing before asking or 
suggesting that translators translate the newly exposed strings. It's much 
more rewarding, working on something like translation, to do a little more 
work and have a fairly complete looking result (not having gui windows that 
are half english, etc.).  Such a blitz could culminate with committing all 
the .po files with the new blank strings to cvs to lessen the load on 
translators.

--Cedric




More information about the grass-dev mailing list