From ce7892546cfe39dfa4164429314ee4a789acdcb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 5 Jun 2018 12:02:50 +0200 Subject: [PATCH] Catch error on calling setlocale() Fixes #9167 --- 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 87f983f25..ed4306202 100644 --- a/gajim/common/i18n.py +++ b/gajim/common/i18n.py @@ -35,8 +35,11 @@ _translations = None def initialize(): global _translations + try: + locale.setlocale(locale.LC_ALL, '') + except locale.Error as error: + print(error) - locale.setlocale(locale.LC_ALL, '') # initialize_win_translation() broken initialize_lang() set_i18n_env()