[r21436]Work around lack of locale.LC_MESSAGES on some Windows pythons

svn: r21437
This commit is contained in:
John Ralls 2013-02-24 17:41:31 +00:00
parent bb2bcc4185
commit 7ff24aa9d1

View File

@ -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: