From 03aa1db306384ff64b25bd3897db057e1eeec0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Thu, 17 May 2018 20:01:31 +0200 Subject: [PATCH] Handle LC_ALL=C correctly We default to 'en' for LANG if LC_ALL=C is set --- gajim/common/i18n.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gajim/common/i18n.py b/gajim/common/i18n.py index 2a2867f91..949719fb8 100644 --- a/gajim/common/i18n.py +++ b/gajim/common/i18n.py @@ -68,7 +68,10 @@ def initialize_lang(): global LANG try: # en_US, fr_FR, el_GR etc.. - LANG = locale.getdefaultlocale()[0] + default = locale.getdefaultlocale()[0] + if default is None: + # LC_ALL=C + return LANG = LANG[:2] except (ValueError, locale.Error): pass