Skip to content
Snippets Groups Projects
Verified Commit 6cea5304 authored by me5na7qbjqbrp's avatar me5na7qbjqbrp
Browse files

Fix ressourcelib context for locales

parent 9eae107f
No related branches found
No related tags found
No related merge requests found
Pipeline #4906 passed with stages
in 4 minutes and 54 seconds
......@@ -18,7 +18,8 @@ except ImportError:
# Load locale
if platform.uname().system == 'Linux':
gettext.bindtextdomain('messages', importlib_resources.path("cpasswords", "locale"))
with importlib_resources.path("cpasswords", "locale") as mo_path:
gettext.bindtextdomain('messages', mo_path)
gettext.textdomain('messages')
_ = gettext.gettext
else:
......
......@@ -24,7 +24,7 @@ def compile_messages():
po.save_as_mofile(mo_file)
mo_files.append(mo_file)
except ImportError:
print("Polib is not installed, tranlation will not be compiled.")
print("Polib is not installed, locales will not be compiled.")
break
return [('locale', mo_files), ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment