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;
|
GStatBuf buf;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef PLATFORM_WIN32
|
#if PLATFORM(WINDOWS)
|
||||||
/* On win32, setlocale() doesn't say anything useful, so we check
|
/* On win32, setlocale() doesn't say anything useful, so we check
|
||||||
* g_win32_getlocale(). Unfortunately it checks the value of $LANG first,
|
* 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
|
* 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
|
* Microsoft Conversion Array by setting it to "Swedish_Sweden", so first
|
||||||
* check that.
|
* check that.
|
||||||
*/
|
*/
|
||||||
locale = g_getenv("LANG");
|
const gchar *env_locale;
|
||||||
if (g_strcmp0(locale, "Swedish_Sweden") == 0)
|
env_locale = g_getenv("LANG");
|
||||||
|
if (g_strcmp0(env_locale, "Swedish_Sweden") == 0)
|
||||||
locale = g_strdup("sv_SE");
|
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");
|
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");
|
locale =g_strdup("sv_AX");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user