mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797569 - Swedish account templates not accessible
Turned out to be a bug introduced by our port to cmake. The Windows special casing for Swedish account hierarchies was never called at all. This fix includes a fix for a const correctness compiler warning as well.
This commit is contained in:
parent
8618c25d50
commit
e91e84e7ed
@ -235,19 +235,20 @@ gnc_get_ea_locale_dir(const char *top_dir)
|
||||
GStatBuf buf;
|
||||
int i;
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
#if PLATFORM(WINDOWS)
|
||||
/* On win32, setlocale() doesn't say anything useful, so we check
|
||||
* g_win32_getlocale(). Unfortunately it checks the value of $LANG first,
|
||||
* and the user might have worked around the absence of sv in gettext's
|
||||
* Microsoft Conversion Array by setting it to "Swedish_Sweden", so first
|
||||
* check that.
|
||||
*/
|
||||
locale = g_getenv("LANG");
|
||||
if (g_strcmp0(locale, "Swedish_Sweden") == 0)
|
||||
const gchar *env_locale;
|
||||
env_locale = g_getenv("LANG");
|
||||
if (g_strcmp0(env_locale, "Swedish_Sweden") == 0)
|
||||
locale = g_strdup("sv_SE");
|
||||
else if (g_strcmp0(locale, "Swedish_Finland") == 0)
|
||||
else if (g_strcmp0(env_locale, "Swedish_Finland") == 0)
|
||||
locale =g_strdup("sv_FI");
|
||||
else if (g_strcmp0(locale, "Swedish_Åland Islands") == 0)
|
||||
else if (g_strcmp0(env_locale, "Swedish_Åland Islands") == 0)
|
||||
locale =g_strdup("sv_AX");
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user