From 1a70f43712dedc3236cc46ee2553aee8d74d983b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 22 Feb 2006 06:39:47 +0000 Subject: [PATCH] fix some TB: #1605 --- src/common/i18n.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/i18n.py b/src/common/i18n.py index 398ab5afc..16a452a57 100644 --- a/src/common/i18n.py +++ b/src/common/i18n.py @@ -41,14 +41,16 @@ locale.setlocale(locale.LC_ALL, '') # get LANG, fallback to ''; LANG can be 'en_US:el_GR.UTF-8:fr_FR' lang = os.environ.get('LANG', '') default_loc = locale.getdefaultlocale()[0] # en_US, fr_FR, el_GR etc.. -if default_loc not in lang.split(':'): # is the default locale a value of LANG? +# is the default locale a value of LANG? +if default_loc and default_loc not in lang.split(':'): # no, add it! if lang == '': lang = default_loc else: lang += ':' + default_loc -os.environ['LANG'] = lang +if lang: + os.environ['LANG'] = lang _translation = None