Work around lack of locale.LC_MESSAGES on some Windows pythons
svn: r21436
This commit is contained in:
parent
af0f98d3b7
commit
6f8fc1be58
@ -200,6 +200,9 @@ class GrampsLocale(object):
|
|||||||
try:
|
try:
|
||||||
#Then set LC_MESSAGES to lang
|
#Then set LC_MESSAGES to lang
|
||||||
locale.setlocale(locale.LC_MESSAGES, 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:
|
except locale.Error:
|
||||||
LOG.warning("Unable to set translations to %s, locale not found.", lang)
|
LOG.warning("Unable to set translations to %s, locale not found.", lang)
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
|
Loading…
Reference in New Issue
Block a user