From 9130ddd23a50071928a330c88cd426bc80ee056f Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 3 Nov 2009 00:34:12 +0000 Subject: [PATCH] Default to 'en' in get_addon_translator() if locale.getlocale()[0] returns None svn: r13483 --- src/TransUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TransUtils.py b/src/TransUtils.py index 04640a619..ba0b3bd07 100644 --- a/src/TransUtils.py +++ b/src/TransUtils.py @@ -79,7 +79,7 @@ def get_addon_translator(filename, domain='addon'): Assumes filename_dir/locale/LANG/LC_MESSAGES/addon.mo. """ import locale - LANG = locale.getlocale()[0] + LANG = locale.getlocale()[0] or "en" path = os.path.dirname(os.path.abspath(filename)) trans = Translator(LANG) try: