mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 21:08:06 +01:00
trunk, experimental:
- Fix crash if default locale isn't supported.
This commit is contained in:
@@ -276,7 +276,11 @@ def get_gettext():
|
||||
# http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/
|
||||
local_path = wpath.translations
|
||||
langs = []
|
||||
try:
|
||||
lc, encoding = locale.getdefaultlocale()
|
||||
except ValueError, e:
|
||||
print str(e)
|
||||
print "Default locale unavailable, falling back to en_US"
|
||||
if (lc):
|
||||
langs = [lc]
|
||||
osLanguage = os.environ.get('LANGUAGE', None)
|
||||
|
||||
Reference in New Issue
Block a user