From 6f8fc1be5805c30c08e4eeea976ac53e244208b1 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sun, 24 Feb 2013 17:38:43 +0000 Subject: [PATCH] Work around lack of locale.LC_MESSAGES on some Windows pythons svn: r21436 --- gramps/gen/utils/grampslocale.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index c73bc69e6..7c0663252 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -200,6 +200,9 @@ class GrampsLocale(object): try: #Then set LC_MESSAGES to lang locale.setlocale(locale.LC_MESSAGES, lang) + except AttributeError: + LOG.warning("Forcing single locale %s" % lang) + locale.setlocale(locale.LC_ALL, lang) except locale.Error: LOG.warning("Unable to set translations to %s, locale not found.", lang) except locale.Error: