mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[Bug 680613] Date format setting seems to be ignored since version 2.4.9
Work around strange side-effect of r21665 which caused LC_TIME to be changed after it had been set by setlocale(LC_ALL) in set_mac_locale(). BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22293 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5143c3c005
commit
66cc460d46
@ -284,9 +284,11 @@ set_mac_locale()
|
||||
[locale objectForKey: NSLocaleCountryCode]];
|
||||
/* If we didn't get a valid current locale, the string will be just "_" */
|
||||
if ([locale_str isEqualToString: @"_"])
|
||||
setlocale(LC_ALL, "en_US");
|
||||
else
|
||||
setlocale(LC_ALL, [locale_str UTF8String]);
|
||||
locale_str = @"en_US";
|
||||
|
||||
setlocale(LC_ALL, [locale_str UTF8String]);
|
||||
if (g_getenv("LANG") == NULL)
|
||||
g_setenv("LANG", [locale_str UTF8String], TRUE);
|
||||
/* If the currency doesn't match the base locale, we need to find a locale that does match, because setlocale won't know what to do with just a currency identifier. */
|
||||
if (![[locale objectForKey: NSLocaleCurrencyCode] isEqualToString:
|
||||
[[[NSLocale alloc] initWithLocaleIdentifier: locale_str] objectForKey: NSLocaleCurrencyCode]]) {
|
||||
|
Loading…
Reference in New Issue
Block a user