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 734069 - 2.6.3 doesn't honor customized currency format (and 2.4.11 does)
2.6.3 doesn't honor customized currency format (and 2.4.11 does)
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: MacOS
2.6.3
Other Mac OS
: Normal normal
: ---
Assigned To: gnucash-mac-maint
gnucash-mac-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-31 19:05 UTC by axel
Modified: 2018-06-29 23:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Preferences snapshot John Ralls asked for (83.32 KB, image/png)
2014-07-31 19:05 UTC, axel
Details
Screen shot showing failure to reproduce anti-problem (269.13 KB, image/png)
2014-09-23 22:44 UTC, John Ralls
Details

Description axel 2014-07-31 19:05:53 UTC
Created attachment 282196 [details]
Preferences snapshot John Ralls asked for

I am running GnuCash on a Mac under OSX 10.8.5.

I am running two versions concurrently - 2.4.11 and 2.6.3.  In both I have my currency set to "CHF (Swiss Franc)".

In 2.4.11 an amount is displayed as CHF 23,473.45 in the Totals column in the Accounts window.

In 2.6.3 the same amount is displayed as Sfr. 23.473,45 (note the transposition of . and ,)

Attached file shows how my system preferences are set.

John Ralls asked me to file this as a bug.
Comment 1 John Ralls 2014-09-23 20:51:36 UTC
Do you need the CHF locale setting for other applications? If not, try setting it back to the default for your region in System Preferences and set the currency to CHF instead of locale in Preferences>Accounts.

Is there anywhere else that the , and . are switched?
Comment 2 John Ralls 2014-09-23 22:44:04 UTC
Created attachment 286942 [details]
Screen shot showing failure to reproduce anti-problem

I'm not able to reproduce what you think is the correct format on 2.4.11/OSX 10.9.5. It's possible but seems unlikely that 10.8.5 would be different. See the screenshot; in the lower-left of the System Preferences box is a summary of the localization settings.
Comment 3 axel 2014-09-27 17:16:16 UTC
I do need my custom setting for other applications, but in any case it looks to me like GC is inferring the decimal and thousands separator from the currency set in Sys Prefs and ignoring the separators set in Sys Prefs.

In 2.4.11 with Sys Prefs > Currency set to USD and 2.4.11 > Prefs > Currency set to CHF, the format comes through as CHF 3,432.15 (which is what I want).  If I change the Sys Prefs > Currency to CHF and do not change any settings in GC, when I restart GC I get the following format: Fr. 3.432,15.  Note that I did not change the number/currency separators in Sys Prefs.

The behavior in 2.6.3 is similar except that the "right" format becomes SFr.3,432.15 instead of CHF 3,431.15.  Note the lack of a space between the currency and the number.  The "wrong" format then becomes SFr.  3.431,15.  Note that the space has returned between the currency and the number.

So it looks like I have to choose in 2.6.3 if I want a space between the currency and number or if I want the separators correct.

Unfortunately I need to have my computer's currency in Sys Prefs set to CHF, which now breaks the separators for BOTH 2.4.11 and 2.6.3.  Previously 2.4.11 had been correct for me but after changing my Sys Prefs setting and restarting 2.4.11 I now appear to have the same problem as with 2.6.3 :-/

Can we have GC honor the separators set in Sys Prefs?
Comment 4 axel 2014-09-27 17:18:48 UTC
In any case it's confusing that GC offers the option in GC > Prefs to change the currency, but then infers the separators from the System Prefs currency.
Comment 5 John Ralls 2014-09-27 18:32:20 UTC
(In reply to comment #3)

> Can we have GC honor the separators set in Sys Prefs?

Unfortunately, no. That's a feature of IBM's International Components for Unicode, which Apple uses but Gtk does not.

Here's what you can do, though: From a shell run
 defaults write -app Gnucash AppleLocale="en_US"
That will set GnuCash's locale to en_US with USD as the currency, leaving the global one alone; you can then set the currency to CHF in Preferences.

(In reply to comment #4)
> In any case it's confusing that GC offers the option in GC > Prefs to change
> the currency, but then infers the separators from the System Prefs currency.

Yes, I understand that. It's unfortunately the way that libc localization works.
Comment 6 axel 2014-09-28 16:37:30 UTC
When I run the defaults command I see this:

Axe-MBP:~ axe$ defaults write -app Gnucash AppleLocale="en_US"
2014-09-28 18:36:14.560 defaults[418:707] 
Rep argument is not a dictionary
Defaults have not been changed.
Axe-MBP:~ axe$ 

?
Comment 7 John Ralls 2014-09-28 16:56:21 UTC
Sorry, no quotes around en_US.
Comment 8 John Ralls 2018-06-29 23:32:30 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=734069. Please continue processing the bug there and please update any external references or bookmarks.