Fwd: [GRASS-dev] Scripting in Linux

Kim Besson kimbesson1981 at gmail.com
Wed Jan 27 11:39:03 EST 2010


This might have something to do with a few messages related with i.tasscap
translation.

Ok (I have tested this at my WinGRASS installation due to limit access to my
LINUX machine):
1- I downloaded grassmods_es.po file (the first language where I want to
have my NDVI calculator available). Other will be Brazilian and of course
English (already available in the Script code).
2- Just like Glynn said, At the po file header is some
information: "Content-Type: text/plain; charset=ISO-8859-1\n"
3- At grassmods.mo the following was there:
#: ../locale/scriptstrings/i.tasscap_to_translate.c:1
msgid "Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM data"
msgstr "Transformación Tasseled Cap (Kauth Thomas) para datos LANDSAT-TM"
4- using po Editor I created mo files and renamed and put them in
location/es/LC_Messages
4- I added the following to my Init.bat
set LANGUAGE=es_ES
set LANG=es_ES
set LC_ALL=es_ES
5- I Started GRASS and realize that:
- GUI is in spanish (bueno :) buttons, text in status bar in the bottom;
menu
- But i.tasscap and neither other scripts are translated even If I have them
in my mo file.
6- I decided to compare the type of files I mean, wxpython_es.po that is
working againts grassmods_es.po that isn't.
Conclusions: The one that is working is  UTF-8
and Content-Transfer-Encoding: 8bit\n and the other one
is charset=ISO-8859-1.

Is this the problem? If it's how can we contour this problem, I mean use
special characters? (I also experiment with De and it also didnt' work).

Thank you

Kim


Kim Besson wrote:

> Ok. I have tested what Antonio sent to the mailing list and the problem is
> that one: I used special characters in the Module/Option description.
>
> So, it seems that I cannot use those special characters.
> My question is: If I want to add a text line in *.po files, regarding a
> description in a Script, in wich *.po file I have to add an extra line?

For scripts, the translation is performed by g.parser, which uses the
"grassmods" file.

> And how can I tell if it's a UTF-8 or a ISO-8859-* file?

At the top of the file, there should be a line like:

       "Content-Type: text/plain; charset=ISO-8859-15\n"

--
Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20100127/50c93c8a/attachment.html


More information about the grass-dev mailing list