[Sorry if this is doubled; it didn't seem to work to grass5]
Markus,
I've edited the locale makefile to pull out translatable strings from tcl
code. (A diff is attached). I've also made small changes on the tcl side to
support both our current but untranslated format and the standard format. My
changes to the makefile only go as far as to merge the "pot" into the "po".
I need to make tcl's msgcat format .msg files and put them into
$(GISBASE)/etc/msgs/.
These files can be made with the command, for example:
msgfmt --statistics --tcl -l pt_br -d ./ grasstcl_pt_br.po
Which makes ./pt_br.msg in the current directory. (The directory is the -d
switch) It, for example, would need to be installed as
$(GISBASE)/etc/msgs/pt_br.msg.
I just can't finish this off. I'm not really comfortable with Makefiles and I
don't have a start on any translation to work with.
Thanks for your help,
--Cedric
(attachments)
localeMakefile.diff (1.13 KB)
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