[GRASS-dev] Messing with locale during start-up in r53620

Maris Nartiss maris.gis at gmail.com
Wed Nov 14 03:10:25 PST 2012


Hi,
all fuss is about MY personal opinion that GRASS SHOULD NOT mess with
system provided locale and language settings UNLESS requested. I
re-run commands from previous mail with r52597 and here is result:
LANG=garbage bin.x86_64-unknown-linux-gnu/grass70
Satīra pagaidu failus...
Startē GRASS GIS...
(and GRASS starts just fine without any error messages as it is not
playing tricks with LANG at all)

After changing language to de (unsupported locale on my system):
bin.x86_64-unknown-linux-gnu/grass70
Failed to set LC_ALL to de_DE.UTF-8
THIS TEXT IS IN GERMAN
Starting GRASS GIS...

(process:11622): Gdk-WARNING **: locale not supported by C library

(process:11622): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

There are some harmless error messages that can be easily fixed, still
GRASS IS using user specified language form the first user visible
message (THIS TEXT IS IN GERMAN message comes from grasslibs_de.po
file).

I agree that init part black magic could be enhanced. Especially
there's a question should CLI also be in user provided language? It's
a tricky subject, as i.e. cal utility with plain LANG is not enough.
Still now I start to think that GRASS shouldn't set anything else
except LANG, LANGUAGE and LC_MESSAGES.

Unless somebody can provide me strong arguments why GRASS should mess
with locale when not requested to do, I'll change startup part to set
only LANG and only when requested.

Maris.

2012/11/13 Martin Landa <landa.martin at gmail.com>:
> Hi,
>
> 2012/11/12 Maris Nartiss <maris.gis at gmail.com>:
>> Hello,
>> OK, I missed the bashrc change, still it seems that GRASS is
>> interfering with locale where it shouldn't:
>> Set language to "system" == no entry in rc or bashrc
>> LANG=garbage bin.x86_64-unknown-linux-gnu/grass70
>>
>> Satīra pagaidu failus...
>> Startē GRASS GIS...
>> Failed to set LC_ALL to garbage.UTF-8 (unsupported locale setting)
>>
>> ^^^ WTF?!? I didn't asked GRASS to touch anything locale related!
>
> you asked to use 'garbage' locales which failed. I would expect it. In
> this case system settings should be used.
>
>> Also for some reason it isn't using the user provided language for
>> startup messages. Here's an example:
>> bin.x86_64-unknown-linux-gnu/grass70
>> Satīra pagaidu failus...
>> Startē GRASS GIS...
>> Failed to set LC_ALL to de_DE.UTF-8 (unsupported locale setting) <---
>> this is correct message, as I don't have de_DE
>>
>> GUI comes up in de, still "Satīra pagaidu failus" isn't de nor
>> C/POSIX. I translated that string as "TEXT IN GERMAN", still it comes
>> up in system LANG.
>
> I would assume that your default locale is different from C/POSIX.
>
> Martin
>
> --
> Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list