Opened 4 months ago

Closed 8 days ago

#3875 closed defect (fixed)

GRASS doesn't start with non-system locale

Reported by: annakrat Owned by: grass-dev@…
Priority: blocker Milestone: 7.8.1
Component: Default Version: git-releasebranch78
Keywords: init script Cc:
CPU: Unspecified Platform: All

Description

When setting different locale, GRASS session doesn't start:

Traceback (most recent call last):
  File "./bin.x86_64-pc-linux-gnu/grass77", line 2204, in <module>
    main()
  File "./bin.x86_64-pc-linux-gnu/grass77", line 2082, in main
    message(_("Starting GRASS GIS..."))
NameError: global name '_' is not defined

Appeared after 2246f5b.

Change History (6)

comment:1 Changed 4 months ago by marisn

To reproduce the issue it is necessary to set language override to some language with unsupported locale.

Thus the full output is:

Failed to enforce user specified language 'ru' with error: 'unsupported locale setting'
A LANGUAGE environmental variable has been set.
Part of messages will be displayed in the requested language.
Traceback (most recent call last):
  File "bin.x86_64-pc-linux-gnu/grass77", line 2204, in <module>
    main()
  File "bin.x86_64-pc-linux-gnu/grass77", line 2082, in main
    message(_("Starting GRASS GIS..."))
NameError: global name '_' is not defined

comment:2 Changed 4 months ago by hellik

windows 10 box with german locale, switching winGRASS to english, wxGUI starts, though some warning:

Error: Reading settings from file <C:\Users\myuser\AppData\Roaming\GRASS7\wx> failed.
                Details: not enough values to unpack (expected 2, got 1)
                Line: ''

switching to ru, wxGUI starts and the GUI is partly in russian, though the same warning:

Error: Reading settings from file <C:\Users\myuser\AppData\Roaming\GRASS7\wx> failed.
                Details: not enough values to unpack (expected 2, got 1)
                Line: ''

tested with

System Info                                                                     
GRASS version: 7.7.dev                                                          
Code revision: 5249e44ac                                                        
Build date: 2019-07-24                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.1                                                                     
PROJ.4: 5.2.0                                                                   
GEOS: 3.7.2                                                                     
SQLite: 3.26.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.18362-SP0 (OSGeo4W)

comment:3 in reply to:  2 Changed 4 months ago by annakrat

Replying to hellik:

windows 10 box with german locale, switching winGRASS to english, wxGUI starts, though some warning:

but that's before the commit that caused this

comment:4 Changed 3 months ago by annakrat

Priority: criticalblocker

Looks like it happens on Mac without special locale setting

comment:5 Changed 4 weeks ago by marisn

Please test if this PR fixes the issue: https://github.com/OSGeo/grass/pull/156

comment:6 Changed 8 days ago by neteler

Milestone: 7.6.27.8.1
Resolution: fixed
Status: newclosed
Version: svn-trunkgit-releasebranch78
Note: See TracTickets for help on using tickets.