Hi Hamish, Probably I did a logical error with the language detection. The place where the language is defined in the script is the time when the LiveDVD build is put together, right? So it's not a script that will run, when a user logs in on the LiveDVD, I guess. This is what I actually thought it would be nice to have. In that case all welcome_message.txt files had to be included to the LiveDVD and selected by another script, I think.
Would this be difficult task? I think, I'm a bit lost in the scripts at the moment ;-) Daniel 2010/9/19 Daniel Kastl <[email protected]> > Hi Hamish > > 2010/9/19 Hamish <[email protected]> > > Daniel wrote: >> > At the code sprint in Barcelona we had the idea to detect the language >> > code automatically by the language the user selected at login (or the >> > language set by default).So Hal made a change in /bin/main.sh to read >> > the $LANG parameter and set the default language (and >> welcome_message.txt) >> > according to it. Here the additional source code: >> > >> > >> > case `echo $LANG | sed 's/_.*//'` in >> ... >> >> is that method acceptable for the Brazilians? >> >> > 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". > > >> >> > The change for custom welcome message is in bin/install_desktop.sh (line >> > 280): >> > >> > cp "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.* \ >> > /usr/local/share/osgeo-desktop/ >> ... >> > Language codes have to be added or deleted when they are ready or >> > not ready to be included. >> >> try: >> >> if [ -e "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.txt" ] ; then >> cp "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.txt \ >> /usr/local/share/osgeo-desktop/ >> else >> cp "$BUILD_DIR"/../desktop-conf/welcome_message.txt \ >> /usr/local/share/osgeo-desktop/ >> fi >> >> >> then if the translated version exists it will be used, otherwise it >> will default to copying in the english version. >> this assumes the DVD builder will be local.. >> > > original welcome_message.sh should always be copied, and duplication of >> english version with desktop-conf/ is to be avoided. (correct way is to >> remove the duplicated version from doc/en/, then if desired (I'm not sure >> it is) 'svn move' from the desktop-conf/ dir; this way full svn history >> is preserved and there is only one master file to edit. if duplicate is >> absolutely needed, tell svn to use a symlink) >> > > 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. > > Daniel > > > >> >> >> regards, >> Hamish >> >> >> >> >> >
_______________________________________________ Live-demo mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/live-demo http://wiki.osgeo.org/wiki/Live_GIS_Disc
