[gimp/gimp-2-8] Bug 675554 - fix overriden language environment variables on Windows.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 675554 - fix overriden language environment variables on Windows.
- Date: Tue, 15 Oct 2013 12:03:58 +0000 (UTC)
commit 1c44eae8c81902e53b62e1704dbbda07533f4545
Author: Jehan <jehan girinstud io>
Date: Tue Oct 8 00:17:56 2013 +1300
Bug 675554 - fix overriden language environment variables on Windows.
If any of the locale environment variables used for UI language is set
(LANGUAGE, LC_ALL, LC_MESSAGES and LANG), do not let Windows' default UI
language override these.
Language set in GIMP preferences still have higher priority.
(cherry picked from commit fe481275e2e42a937618366d18cd6aa03bec3b59)
app/language.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/language.c b/app/language.c
index 6fc4a3c..caa1412 100644
--- a/app/language.c
+++ b/app/language.c
@@ -37,7 +37,11 @@ void
language_init (const gchar *language)
{
#ifdef G_OS_WIN32
- if (! language)
+ if (! language &&
+ g_getenv ("LANG") == NULL &&
+ g_getenv ("LC_MESSAGES") == NULL &&
+ g_getenv ("LC_ALL") == NULL &&
+ g_getenv ("LANGUAGE") == NULL)
{
/* FIXME: This is a hack. gettext doesn't pick the right language
* by default on Windows, so we enforce the right one. The
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]