plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit a5a38f446a384737556f7ef1e618d045a84d8f62
parent 95d519dc27a6b724955830a05a2d781db336b58e
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 14 Aug 2019 16:41:59 +0200

fix localization

Diffstat:
plint/localization.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plint/localization.py b/plint/localization.py @@ -1,6 +1,7 @@ import gettext import locale import logging +import os def init_locale(loc=None): locale.setlocale(locale.LC_ALL, '') # use user's preferred locale @@ -9,7 +10,7 @@ def init_locale(loc=None): loc = locale.getlocale() else: loc = [loc] - filename = "res/messages_%s.mo" % loc[0][0:2] + filename = os.path.dirname(__file__) + "/res/messages_%s.mo" % loc[0][0:2] try: logging.debug("Opening message file %s for locale %s", filename, loc[0])