Opened 12 years ago

Closed 8 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 12 years ago.
Patch to load user's LANG from GRASSRC6 file

Download all attachments as: .zip

Change History (14)

comment:1 by neteler, 12 years ago

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

comment:2 by cmbarton, 12 years ago

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 by marisn, 12 years ago

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 by neteler, 12 years ago

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 by neteler, 12 years ago

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

by neteler, 12 years ago

Attachment: init_bat.diff added

Patch to load user's LANG from GRASSRC6 file

in reply to:  3 comment:6 by neteler, 12 years ago

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 by neteler, 12 years ago

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

comment:8 by cmbarton, 12 years ago

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

Michael

comment:9 by cmbarton, 12 years ago

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 by neteler, 11 years ago

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

comment:11 by MilenaN, 11 years ago

It works on windows7 grass6.4.3RC1.

comment:12 by neteler, 8 years ago

Milestone: 6.4.36.4.6

comment:13 by milenan, 8 years ago

Resolution: fixed
Status: newclosed

Works in GRASS6.4.4 and 7.2svn (windows10)

Note: See TracTickets for help on using tickets.