From d334e0043f39fb9bb105a0b0bee3a5494b4a022d Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 28 Feb 2013 19:22:55 +0000 Subject: [PATCH] [r21490]MacLocale: Allow $LANG to override defaults settings For currency, calendar, and collation svn: r21498 --- gramps/gen/utils/maclocale.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps/gen/utils/maclocale.py b/gramps/gen/utils/maclocale.py index 171a52d11..eb075f97a 100644 --- a/gramps/gen/utils/maclocale.py +++ b/gramps/gen/utils/maclocale.py @@ -262,7 +262,8 @@ def mac_setup_localization(glocale, lang, language): glocale.language = language - if currency and "LC_MONETARY" not in os.environ: + if (currency and "LC_MONETARY" not in os.environ + and "LANG" not in os.environment): glocale.currency = currency os.environ["LC_MONETARY"] = currency elif "LC_MONETARY" in os.environ: @@ -270,7 +271,8 @@ def mac_setup_localization(glocale, lang, language): else: glocale.currency = lang - if calendar and "LC_TIME" not in os.environ: + if (calendar and "LC_TIME" not in os.environ + and "LANG" not in os.environ): glocale.calendar = calendar os.environ["LC_TIME"] = calendar elif "LC_TIME" in os.environ: @@ -278,7 +280,8 @@ def mac_setup_localization(glocale, lang, language): else: glocale.calendar = lang - if collation and "LC_COLLATION" not in os.environ: + if (collation and "LC_COLLATION" not in os.environ + and "LANG" not in os.environ): glocale.collation = collation os.environ["LC_COLLATION"] = calendar elif "LC_COLLATION" in os.environ: