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 &#39;C&#39; 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">&lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;</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>
&gt; This might have something to do with a few messages related with i.tasscap<br>
&gt; translation.<br>
&gt;<br>
&gt; Ok (I have tested this at my WinGRASS installation due to limit access to my<br>
&gt; LINUX machine):<br>
&gt; 1- I downloaded grassmods_es.po file (the first language where I want to<br>
&gt; have my NDVI calculator available). Other will be Brazilian and of course<br>
&gt; English (already available in the Script code).<br>
&gt; 2- Just like Glynn said, At the po file header is some<br>
&gt; information: &quot;Content-Type: text/plain; charset=ISO-8859-1\n&quot;<br>
&gt; 3- At grassmods.mo the following was there:<br>
&gt; #: ../locale/scriptstrings/i.tasscap_to_translate.c:1<br>
&gt; msgid &quot;Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM data&quot;<br>
&gt; msgstr &quot;Transformación Tasseled Cap (Kauth Thomas) para datos LANDSAT-TM&quot;<br>
&gt; 4- using po Editor I created mo files and renamed and put them in<br>
&gt; location/es/LC_Messages<br>
&gt; 4- I added the following to my Init.bat<br>
&gt; set LANGUAGE=es_ES<br>
&gt; set LANG=es_ES<br>
&gt; set LC_ALL=es_ES<br>
&gt; 5- I Started GRASS and realize that:<br>
&gt; - GUI is in spanish (bueno :) buttons, text in status bar in the bottom;<br>
&gt; menu<br>
&gt; - But i.tasscap and neither other scripts are translated even If I have them<br>
&gt; in my mo file.<br>
&gt; 6- I decided to compare the type of files I mean, wxpython_es.po that is<br>
&gt; working againts grassmods_es.po that isn&#39;t.<br>
<br>
</div></div>Ensure that GRASS was configured with the --with-nls flag, otherwise<br>
it won&#39;t use translations. The wxPython GUI will use translations<br>
regardless of how GRASS was configured.<br>
<div class="im"><br>
&gt; Conclusions: The one that is working is  UTF-8<br>
&gt; and Content-Transfer-Encoding: 8bit\n and the other one<br>
&gt; is charset=ISO-8859-1.<br>
&gt;<br>
&gt; Is this the problem? If it&#39;s how can we contour this problem, I mean use<br>
&gt; special characters? (I also experiment with De and it also didnt&#39; work).<br>
<br>
</div>The encoding of the .po file isn&#39;t &quot;visible&quot; 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&#39;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&#39;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&#39;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 &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br>
</div></div></blockquote></div><br>