1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-21 21:38:06 +01:00

Apply lang patch from David Paleino

This commit is contained in:
Dan O'Reilly
2009-03-01 23:15:34 -05:00
parent 80d05774d9
commit 6dd0642079

View File

@@ -353,7 +353,11 @@ def get_gettext():
if osLanguage: if osLanguage:
langs += osLanguage.split(":") langs += osLanguage.split(":")
try: try:
lc, encoding = locale.getdefaultlocale() # This avoids a bug: locale.getdefaultlocale() prefers
# LC_CTYPE over LANG/LANGUAGE
lc, encoding = locale.getdefaultlocale(envvars=('LC_MESSAGES',
'LC_ALL', 'LANG',
'LANGUAGE'))
except ValueError, e: except ValueError, e:
print str(e) print str(e)
print "Default locale unavailable, falling back to en_US" print "Default locale unavailable, falling back to en_US"