Commit dad7def7 authored by Philipp Hörist's avatar Philipp Hörist

Catch error if no translation is found

parent a34bf54c
......@@ -136,7 +136,11 @@ def ngettext(s_sing, s_plural, n, replace_sing=None, replace_plural=None):
gettext.install(DOMAIN, _localedir)
_ = gettext.translation(DOMAIN, _localedir).gettext
_ = gettext.translation(DOMAIN, _localedir).gettext
except OSError:
_ = gettext.gettext
if gettext._translations:
_translations = list(gettext._translations.values())[0]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment