Hi Hamish<br><br><div class="gmail_quote">2010/9/19 Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">Daniel wrote:<br>
> At the code sprint in Barcelona we had the idea to detect the language<br>
> code automatically by the language the user selected at login (or the<br>
> language set by default).So Hal made a change in /bin/main.sh to read<br>
> the $LANG parameter and set the default language (and welcome_message.txt)<br>
> according to it. Here the additional source code:<br>
><br>
><br>
> case `echo $LANG | sed 's/_.*//'` in<br>
</div>...<br>
<br>
is that method acceptable for the Brazilians?<br>
<div class="im"><br></div></blockquote><div><br></div><div>As far as I understand it is always something like "de_DE", while the first part is the language and the second one the country. I don't know about Brazilians but for German it would work, for example Austria should be "de_AT".</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
> The change for custom welcome message is in bin/install_desktop.sh (line<br>
> 280):<br>
><br>
> cp "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.* \<br>
>   /usr/local/share/osgeo-desktop/<br>
</div>...<br>
<div class="im">> Language codes have to be added or deleted when they are ready or<br>
> not ready to be included.<br>
<br>
</div>try:<br>
<br>
if [ -e "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.txt" ] ; then<br>
   cp "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.txt \<br>
<div class="im">     /usr/local/share/osgeo-desktop/<br>
</div>else<br>
   cp "$BUILD_DIR"/../desktop-conf/welcome_message.txt \<br>
<div class="im">     /usr/local/share/osgeo-desktop/<br>
</div>fi<br>
<br>
<br>
then if the translated version exists it will be used, otherwise it<br>
will default to copying in the english version.<br>
this assumes the DVD builder will be local..<br> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
original welcome_message.sh should always be copied, and duplication of<br>
english version with desktop-conf/ is to be avoided. (correct way is to<br>
remove the duplicated version from doc/en/, then if desired (I'm not sure<br>
it is) 'svn move' from the desktop-conf/ dir; this way full svn history<br>
is preserved and there is only one master file to edit. if duplicate is<br>
absolutely needed, tell svn to use a symlink)<br></blockquote><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Well, I think it would be better to have all texts in doc/<language>/ directory, so I would rather have the default "welcome_message.txt" in "doc/en" than in desktop-conf directory.  But having some fall-back is always good idea. </div>

</div><div><br></div><div>Daniel</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
regards,<br>
<font color="#888888">Hamish<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>