From 1f0cc2b6655ef34cb6773f0d0c39273c50871723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 17 Oct 2017 16:28:56 +0200 Subject: [PATCH] Fix bindtextdomain not available on MacOS --- 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 dec167547..038cec1cd 100644 --- a/gajim/common/i18n.py +++ b/gajim/common/i18n.py @@ -76,7 +76,10 @@ else: if base is None or base[0] != '/': base = os.path.expanduser('~/.local/share') localedir = os.path.join(base, "locale") - locale.bindtextdomain(APP, localedir) + + if hasattr(locale, 'bindtextdomain'): + locale.bindtextdomain(APP, localedir) + gettext.install(APP, localedir) if gettext._translations: