[GRASS-dev] i.tasscap translation- Scripts

Greetings
I’m using WinGRASS6.4 and I’m having a few difficulties with language packages
I already set my language at init.bat and I my WxGui is translated wihout problems.
But, When I open i.tasscap the script description and options is not translated, and according to my grasswxpy.po it was suppose to be.
And the same happens with i.oif. It seems that wxpy.po is not being used to translate scripts but only to GUI.

Any ideas of how to solve this?

Thanks
Gilbert

On Wed, Jan 27, 2010 at 11:47 AM, Gilbert Ferrara
<gilbertferrara1974@gmail.com> wrote:

Greetings
I'm using WinGRASS6.4 and I'm having a few difficulties with language
packages
I already set my language at init.bat and I my WxGui is translated wihout
problems.
But, When I open i.tasscap the script description and options is not
translated, and according to my grasswxpy.po it was suppose to be.
And the same happens with i.oif. It seems that wxpy.po is not being used to
translate scripts but only to GUI.

That's right.

Any ideas of how to solve this?

The script messages are in the
grassmods_XX.po
files. You need to translate there (please send the the changes then
for inclusion
in SVN).

Markus

Markus Neteler wrote:

> I'm using WinGRASS6.4 and I'm having a few difficulties with language
> packages
> I already set my language at init.bat and I my WxGui is translated wihout
> problems.
> But, When I open i.tasscap the script description and options is not
> translated, and according to my grasswxpy.po it was suppose to be.
> And the same happens with i.oif. It seems that wxpy.po is not being used to
> translate scripts but only to GUI.

That's right.

> Any ideas of how to solve this?

The script messages are in the
grassmods_XX.po
files. You need to translate there (please send the the changes then
for inclusion
in SVN).

Should g.parser be updated to allow the translation domain to be
specified?

Currently, it uses "grassmods" (g.parser itself is a module), but that
means that anyone wanting to translate a custom script has to merge
their translations into the grasssmods_*.po files.

It might be useful to allow this to be overridden via e.g. an
environment variable (adding command-line options to g.parser is
tricky), so that individual scripts could use a different domain.

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

On Thu, Jan 28, 2010 at 3:00 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

...

The script messages are in the
grassmods_XX.po
files. You need to translate there (please send the the changes then
for inclusion
in SVN).

Should g.parser be updated to allow the translation domain to be
specified?

I think yes.

Currently, it uses "grassmods" (g.parser itself is a module), but that
means that anyone wanting to translate a custom script has to merge
their translations into the grasssmods_*.po files.

It would be pretty nice to separate the "main" GRASS part from user
customization also for the translations.

It might be useful to allow this to be overridden via e.g. an
environment variable (adding command-line options to g.parser is
tricky), so that individual scripts could use a different domain.

Sounds good to me and I volunteer to make tests then.

Markus

Markus Neteler wrote:

> Should g.parser be updated to allow the translation domain to be
> specified?

I think yes.

> Currently, it uses "grassmods" (g.parser itself is a module), but that
> means that anyone wanting to translate a custom script has to merge
> their translations into the grasssmods_*.po files.

It would be pretty nice to separate the "main" GRASS part from user
customization also for the translations.

> It might be useful to allow this to be overridden via e.g. an
> environment variable (adding command-line options to g.parser is
> tricky), so that individual scripts could use a different domain.

Sounds good to me and I volunteer to make tests then.

r40727 and r40728 allow the translation domain to be specified via
GRASS_TRANSLATION_DOMAIN, e.g. (shell):

  GRASS_TRANSLATION_DOMAIN=myscript
  export GRASS_TRANSLATION_DOMAIN

  if [ "$1" != "@ARGS_PARSED@" ] ; then
      exec g.parser "$0" "$@"
  fi

or (Python):

  if __name__ == "__main__":
      os.environ['GRASS_TRANSLATION_DOMAIN'] = 'myscript'
      options, flags = grass.parser()
      main()

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