Hello all <div><br></div><div>Ok I have configured and compiled with -nls with the latest SVN6.4 snapshot. I defined LANG and LANGUAGE in init.sh. <br>my grasswxpy seems to be working but I thing my grassmods is not being read since no script/module is being translated.</div>
<div><br></div><div>I got the following warning in my terminal window:</div><div><div><br></div><div>(process:2783): Gdk-WARNING **: locale not supported by C library</div><div><br></div><div>(process:2783): Gtk-WARNING **: Locale not supported by C library.</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">        </span>Using the fallback 'C' locale.</div><div><br></div></div><div><br></div><div>Do anyone knows what might be happening?</div><div><br></div><div>Thank you so much</div>
<div>Kim</div><br><div class="gmail_quote">2010/1/27 Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
Kim Besson wrote:<br>
<br>
> This might have something to do with a few messages related with i.tasscap<br>
> translation.<br>
><br>
> Ok (I have tested this at my WinGRASS installation due to limit access to my<br>
> LINUX machine):<br>
> 1- I downloaded grassmods_es.po file (the first language where I want to<br>
> have my NDVI calculator available). Other will be Brazilian and of course<br>
> English (already available in the Script code).<br>
> 2- Just like Glynn said, At the po file header is some<br>
> information: "Content-Type: text/plain; charset=ISO-8859-1\n"<br>
> 3- At grassmods.mo the following was there:<br>
> #: ../locale/scriptstrings/i.tasscap_to_translate.c:1<br>
> msgid "Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM data"<br>
> msgstr "Transformación Tasseled Cap (Kauth Thomas) para datos LANDSAT-TM"<br>
> 4- using po Editor I created mo files and renamed and put them in<br>
> location/es/LC_Messages<br>
> 4- I added the following to my Init.bat<br>
> set LANGUAGE=es_ES<br>
> set LANG=es_ES<br>
> set LC_ALL=es_ES<br>
> 5- I Started GRASS and realize that:<br>
> - GUI is in spanish (bueno :) buttons, text in status bar in the bottom;<br>
> menu<br>
> - But i.tasscap and neither other scripts are translated even If I have them<br>
> in my mo file.<br>
> 6- I decided to compare the type of files I mean, wxpython_es.po that is<br>
> working againts grassmods_es.po that isn't.<br>
<br>
</div></div>Ensure that GRASS was configured with the --with-nls flag, otherwise<br>
it won't use translations. The wxPython GUI will use translations<br>
regardless of how GRASS was configured.<br>
<div class="im"><br>
> Conclusions: The one that is working is UTF-8<br>
> and Content-Transfer-Encoding: 8bit\n and the other one<br>
> is charset=ISO-8859-1.<br>
><br>
> Is this the problem? If it's how can we contour this problem, I mean use<br>
> special characters? (I also experiment with De and it also didnt' work).<br>
<br>
</div>The encoding of the .po file isn't "visible" to the code which uses<br>
the translations. The .mo file will always contain UTF-8 text, but<br>
this is automatically converted to the locale's encoding when the<br>
translation is retrieved.<br>
<br>
In 6.4, there is (or was?) a known bug with the GUI and non-UTF-8<br>
locales: the GUI converts the text from the locale's encoding to<br>
UTF-8, but leaves the original encoding in the XML header, which can<br>
confuse the XML parser. But this depends upon the locale's encoding,<br>
not the encoding of the .po file.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</div></div></blockquote></div><br>