[GRASS5] another approach to i18n for tcltkgrass; former one revoked

Glynn Clements glynn.clements at virgin.net
Tue May 21 12:04:03 EDT 2002


Alex Shevlakov wrote:

> > > makes tcltkgrass slow.
> > 
> > Are you referring to the startup, or to normal
> > operation?
> 
> I was referring mainly to load time (startup).
> This made things slow in overall, though. I used a
> make-up file combined of about 100 
> :msgcat:mc 'eng_message' 'ru_message' lines. The test
> showed slow. This is why I think of not using msgcat.
> 
> > BTW, is the "msgcat" package written in Tcl, or does
> > it use the
> > functions from libintl/libc?
> 
> This is TCL.(:(

OK, that would explain the performance hit. I had initially assumed
that it was just Tcl bindings for the corresponding libintl/libc
functionality.

> > > This is why using msgcat for the purpose of i18n
> > seems to me not a
> > > good choice now.
> > > 
> > > Another method would be to place the translated
> > script 'menu.tcl' and
> > > modules scripts to src/locale/$LCL/tcltkgrass
> > directory and copy them
> > > if they are needed to $GISBASE/tcltkgrass.
> > 
> > That would mean that the locale was fixed at install
> > time; it should
> > be determined at run time, according to $LANG or
> > $LC_MESSAGES.
> 
> Please see the locale/Gmakefile. If $LCL is defined at
> run-time, it is defined the same for mofiles and
> tcltkgrass, i.e., once define both.

locale/Gmakefile is run at *install* time. "run time" is when the user
runs "tcltkgrass". Currently, if NLS support is enabled, the Russian
versions will be installed over the English versions. Which isn't
acceptable.

The correct solution is to install the localised versions to a
separate directory, and have tcltkgrass source the appropriate version
depending upon $env(LC_MESSAGES), or $env(LANG) if the former is
unset.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list