From 39994be579bfc147922283aac3067b6859eaa264 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 12 Mar 2018 09:27:03 -0600 Subject: [PATCH] Install unicode gettext function if Python 2 --- src/i18n.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n.py b/src/i18n.py index 8803f6c..a67bc91 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -2,9 +2,13 @@ import os import gettext import locale +import sys from platform_utils import paths def setup(): lang = locale.getdefaultlocale()[0] os.environ["lang"] = lang - gettext.install("musicdl", localedir=os.path.join(paths.app_path(), "locales")) \ No newline at end of file + if sys.version[0] == "3": + gettext.install("musicdl", localedir=os.path.join(paths.app_path(), "locales")) + else: + gettext.install("musicdl", localedir=os.path.join(paths.app_path(), "locales"), unicode=True) \ No newline at end of file