[GRASS-dev] i18N guisection bug

Glynn Clements glynn at gclements.plus.com
Thu Oct 18 23:30:33 EDT 2007


Hamish wrote:
> > > Markus wrote:
> > >>>         flag.gprint->guisection  = _("Print;Shell Script");
> > > ..
> > >> thanks but I am afraid that the bug persists.
> Hamish:
> > > what if you change 
> > > -         flag.gprint->guisection  = _("Print;Shell Script");
> > > +         flag.gprint->guisection  = _("Print");
> > > 
> > 
> > This looks good! So let's fix it like this (also in 6.2-CVS for 6.2.3).
> 
> 
> I would still like to know what the ';' is trying to do. There is parsing code
> to deal with it, better to document+fix that. Maybe it is some really
> interesting feature that we throw away due to ignorance?
> So I would lean to making the above change in 6.2-CVS now and trying to
> understand/fix the root of the problem in gui.tcl for 6.3-CVS.

Sections are hierarchical. Each top-level section corresponds to a tab
in the dialog. Each subsection corresponds to a frame within the
parent section, so options within the same subsection will be grouped
together in the tab.

For a short-term "fix", the substitution should occur after
normalize_guisection, which parses the guisection string into a Tcl
list.

For the longer term: the idea of generating the Tk widget path for the
tab from the title won't work in locales which aren't based upon the
latin alphabet (Greek, Russian, Japanese etc). You'll end up with
names containing nothing but underscores. It would probably be
simplest just to allocate unique IDs using a counter.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list