Opened 7 years ago

Closed 3 years ago

#1699 closed defect (fixed)

language setting in wxGUI preferences does not work; could cause GUI crash

Reported by: cmbarton Owned by: grass-dev@…
Priority: major Milestone: 6.4.6
Component: wxGUI Version: svn-releasebranch64
Keywords: internationalization Cc:
CPU: Unspecified Platform: Unspecified

Description

Changing the language in the GUI has no effect. In some cases, the non-functional code causes and error and the GUI to crash. Maris fixed this in GRASS 7. A similar fix is needed here. This is at least a problem on the Mac. Perhaps it works on other systems, but I can't see how it does given the code.

Attachments (1)

init_bat.diff (475 bytes) - added by neteler 7 years ago.
Patch to load user's LANG from GRASSRC6 file

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by neteler

Confirmed, using current 6.4.svn on an Italian Windows XP, I cannot switch to English.

comment:2 Changed 7 years ago by cmbarton

Maris Nartiss worked out a fix for this on GRASS 7. It is not a simple backport, but should be possible to implement it in GRASS 6.4.3 as the relevant code is similar.

Michael

comment:3 Changed 7 years ago by marisn

I backported GUI part in r53041 and made it to work on *nix systems in r53042

I have no idea if on MacOS X startup is using init.sh. Sorry, no time now to analyse init.bat and get it to run on Windows.

comment:4 Changed 7 years ago by neteler

On Windows, I get on my machine

C:\Programmi\GRASS GIS 6.4.3svn\etc>winlocale
it_IT

In init.bat, it picks it up at

if not "%LANG%"=="" goto langset
FOR /F "usebackq delims==" %%i IN (`"%GISBASE%\etc\winlocale"`) DO @set LANG=%%i
:langset

However, I don't see where an existing LANG setting would be picked up from GRASSRC6.

comment:5 Changed 7 years ago by neteler

Quick hack if you need to change the language:

edit this file: C:\Programms\GRASS GIS 6.4.3svn\etc\env.bat

and add therein this line (here, to enable English):

set LANG=en

Changed 7 years ago by neteler

Attachment: init_bat.diff added

Patch to load user's LANG from GRASSRC6 file

comment:6 in reply to:  3 Changed 7 years ago by neteler

Replying to marisn:

Sorry, no time now to analyse init.bat and get it to run on Windows.

I have attached a patch to load the user's LANG setting from GRASSRC6 file. Works for me on XP, I can switch to another language in wxGUI, restart GRASS and it is picked up properly.

comment:7 Changed 7 years ago by neteler

Windows fix submitted as r53044 (6.4.svn) and r53045 (6.5.svn).

comment:8 Changed 7 years ago by cmbarton

I'll give this a test this weekend now that I'm compiling again. Thanks for working on it.

Michael

comment:9 Changed 7 years ago by cmbarton

This is still not working. I can change the language setting and the setting gets saved in .grassrc6 as LANG=[setting]. But it makes no difference to the GUI.

I've also tried setting language in .profile (export LANG=es, export LC_ALL=es, etc) and it makes no difference at all. Nothing crashing on my Mac, but it only crashed on a spanish colleague's Mac and he is out of town so I cannot ask him to test.

Michael

comment:10 Changed 7 years ago by neteler

Is this still an issue with a recent 6.4.svn?

comment:11 Changed 7 years ago by MilenaN

It works on windows7 grass6.4.3RC1.

comment:12 Changed 3 years ago by neteler

Milestone: 6.4.36.4.6

comment:13 Changed 3 years ago by milenan

Resolution: fixed
Status: newclosed

Works in GRASS6.4.4 and 7.2svn (windows10)

Note: See TracTickets for help on using tickets.