After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 450353 - French locale fr instead of fr_FR on Windows
French locale fr instead of fr_FR on Windows
Status: VERIFIED INCOMPLETE
Product: GnuCash
Classification: Other
Component: Windows
2.1.x
Other All
: Normal enhancement
: ---
Assigned To: Andreas Köhler
Christian Stimming
Depends on:
Blocks:
 
 
Reported: 2007-06-23 13:40 UTC by Yannick LE NY
Modified: 2018-06-29 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Print the result of g_win32_getlocale() (6.00 KB, application/octet-stream)
2007-06-24 14:52 UTC, Andreas Köhler
Details

Description Yannick LE NY 2007-06-23 13:40:42 UTC
Please describe the problem:
Hello,

I use Gnucash-2.1.4 with Windows 2000 Professionnal and Service Pack 4.
Windows Language Parameter : French(France).
When I create a new file with a new account, Gnucash don't load french translated account strings.The hierarchy account is in english. Category list is in english.Category description is in english.

I found a workaround to have the hierachy account and category list in french.
I copy the directory C:\Program Files\gnucash\share\gnucash\accounts\fr_FR to C:\Program Files\gnucash\share\gnucash\accounts\fr and after this copy , Gnucash load correctly the french translated account strings. 

Thanks to correct this problem for gnucash 2.1.5 or gnucash-2.2.0.

Yannick LE NY

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Andreas Köhler 2007-06-24 14:51:11 UTC
Could you please tell us your effective locale by running the attached program?
Comment 2 Andreas Köhler 2007-06-24 14:52:03 UTC
Created attachment 90557 [details]
Print the result of g_win32_getlocale()
Comment 3 Yannick LE NY 2007-06-24 23:12:51 UTC
Print the result of g_win32_getlocale()

C:\>lang
Locale: fr
Comment 4 Christian Stimming 2007-06-25 09:12:37 UTC
Well, we have fr_CA, fr_CH, and fr_FR account templates. Which one should we choose if the locale only says "fr"...? :-)
Comment 5 Andreas Köhler 2007-06-25 09:19:03 UTC
Hm.  Reading http://developer.gnome.org/doc/API/2.0/glib/glib-Windows-Compatibility-Functions.html#id2879870
I think there is a bug in GLib.
CC'ing tml, he may know better.
Comment 6 Tor Lillqvist 2007-06-25 09:58:29 UTC
The exact strings returned by from g_win32_getlocale() have not been that strictly defined. Anyway, in GLib 2.12.8 and later g_win32_getlocale() will always return a string of the form "<iso639>_<iso3166>", where <iso639> is the language code and <iso3166> the country code, possibly suffixed with a script like "@Latn". 

Presumably, for French, based on what locales EnumSystemLocales() gives on XP, the returned string will then always be one of: fr-FR fr-BE fr-CA fr-CH fr-LU fr-MC. On Vista probably even more possibilities.

The corresponding ChangeLog entry:

2007-01-15  Tor Lillqvist  <tml@novell.com>

	* glib/gwin32.c (g_win32_getlocale): Simplify greatly. Instead of
	hardcoding a large switch statement, just ask Windows for the
	ISO639 and ISO3166 codes. Tack on @Latn or @Cyrl for those
	languages which can alternatively be written in Latin or
	Cyrillic. Fixes #395419.

Try the test program with a more recent GLib, 2.12.8 or later.
Comment 7 Tor Lillqvist 2007-06-25 09:59:28 UTC
Oops, replace dashes with underscores above.
Comment 8 Andreas Köhler 2007-06-25 10:03:42 UTC
That is strange, because we ship GnuCash with GLib 2.12.11.
Yannick, please make sure you locate lang.exe in the bin subdirectory of your gnucash installation and that libglib-2.0-0.dll has a version string of 2.12.11 (I think the Windows Explorer can show that, depends.exe definitely does it)
Comment 9 Tor Lillqvist 2007-06-25 10:11:14 UTC
It could also be that Yannick has set one of the environment variables LC_ALL, LC_MESSAGES or LANG to "fr" (by mistake, or maybe some unrelated software has done it). That will override.
Comment 10 Yannick LE NY 2007-06-25 18:12:42 UTC
Hello,

I have more information for you.
I use Gnucash-2.1.4 with Windows 2000 Professionnal and Service Pack 4.
Windows Language Parameter : French(France).

I found on my harddisk :
C:\Program Files\Fichiers communs\GTK\2.0\bin\libglib-2.0-0.dll
version :  2.12.11.0

C:\Program Files\gnucash\bin\libglib-2.0-0.dll
version :  2.12.11.0

C:\Program Files\Miranda-IM\libglib-2.0-0.dll
version :  2.6.6.0

C:\Program Files\Grisbi\libglib-2.0-0.dll
version :  2.6.6.0

I found in my windows user variables :
LANG=fr

I remove all files with libglib-2.0-0.dll (version :  2.6.6.0) and remove my user variables LANG= fr and I reboot my Personnal Computer.
I do :
C:\>lang
Locale: fr
But when I start gnucash , the gnucash accounts are in english.

After this test, I stop Gnucash.
I add LANG=fr_FR in my windows user variables.
I do :
C:\>lang
Locale: fr
But when I start now gnucash , the gnucash accounts are in french.

Do you need to add LANG=fr_FR in the windows user variables when the gnucash's windows installer is installing gnucash on the user's PC.


Comment 11 Tor Lillqvist 2007-06-25 20:00:49 UTC
You shouldn't have to set any environment variable. Just making sure you use GLib 2.12.8 or newer should be enough. Are you sure that you started a fresh command prompt after changing the environment variables? Maybe you by mistake did the test in a shell where the old LANG=fr was still in force? Otherwise I don't understand what is going on...
Comment 12 Yannick LE NY 2007-06-25 20:39:47 UTC
I do a new test by default with Windows 2000 Professionnal and Service Pack 4
and Windows Language Parameter : French(France).
I reboot my PC.
I have no lang  environment variable in my user environment variables.
I do it in a shell window with cmd command:
C:\>lang
Locale: fr

Next, I add LANG=fr_FR in my windows user variables.
I do it in a NEW shell window with cmd command:
C:\>lang
Locale: fr_FR


Comment 13 Yannick LE NY 2007-06-26 11:53:37 UTC
Hello,

I do a new test AT WORK with an other PC with Windows 2000 Professionnal and Service Pack 4 and Windows Language Parameter : French(France).
I have no problem, all are in french except if I add LANG=fr in my windows user variables.
I don' know what is the problem with gnucash with my PC at home.

Yannick
Comment 14 Andreas Köhler 2007-06-26 18:55:25 UTC
Out of curiosity: There is no _system_ variable LANG, LANGUAGE or LC_something set, right? :-)
Comment 15 Yannick LE NY 2007-06-27 08:26:45 UTC
Yes, there is no _system_ variable LANG, LANGUAGE or LC_something
set on my PC at home or at work now.
Comment 16 Andreas Köhler 2008-05-11 22:00:10 UTC
Yannick, GnuCash 2.2.5 ships with GLib 2.14.6, so is this still an issue?
Comment 17 Christian Stimming 2008-11-07 21:35:21 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 18 John Ralls 2018-06-29 21:40:08 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=450353. Please update any external references or bookmarks.