[GRASS-dev] [GRASS GIS] #2360: grass startup script and wx preference file: language setting in wx does not contain country specific language code
GRASS GIS
trac at osgeo.org
Thu Jul 10 01:47:31 PDT 2014
#2360: grass startup script and wx preference file: language setting in wx does
not contain country specific language code
-------------------------+--------------------------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Keywords: locale | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
When I launch grass7 (fresh from trunk), I get the following message at
startup:
{{{
WARNING: A language override has been requested. Trying to switch GRASS
into 'fr'...
Failed to enforce user specified language 'fr' with error: 'unsupported
locale setting'
A LANGUAGE environmental variable has been set.
Part of messages will be displayed in the requested language.
}}}
Tracing back what happens I see that when the user sets a language
preference in the wx gui, this preference is stored in the .grass7/wx file
as the two-letter language code ('fr' for French in this case). The locale
checking and setting magic in set_language() in the grass7 startup script
uses (among others):
{{{
encoding = 'UTF-8'
normalized = locale.normalize('%s.%s' % (language, encoding))
locale.setlocale(locale.LC_ALL, normalized)
}}}
However, locale.normalize in this case transforms fr into fr_FR, whereas
on my machine the only installed locale is fr_BE. Now I can just install
fr_FR and the message goes away, and even with the message, GRASS seems to
work ok, so this is not a major issue. However, it might throw off some
users to see this message every time they start GRASS.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2360>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list