Install unicode gettext function if Python 2
This commit is contained in:
parent
c67c835ecd
commit
39994be579
@ -2,9 +2,13 @@
|
|||||||
import os
|
import os
|
||||||
import gettext
|
import gettext
|
||||||
import locale
|
import locale
|
||||||
|
import sys
|
||||||
from platform_utils import paths
|
from platform_utils import paths
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
lang = locale.getdefaultlocale()[0]
|
lang = locale.getdefaultlocale()[0]
|
||||||
os.environ["lang"] = lang
|
os.environ["lang"] = lang
|
||||||
gettext.install("musicdl", localedir=os.path.join(paths.app_path(), "locales"))
|
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)
|
Loading…
Reference in New Issue
Block a user