Skip to content
Snippets Groups Projects
Commit c7d953bd authored by me5na7qbjqbrp's avatar me5na7qbjqbrp
Browse files

Merge branch 'locale' into 'dev'

Use GNU gettext only on Linux

See merge request !11
parents 26381add ad9ea7e7
No related branches found
No related tags found
1 merge request!11Use GNU gettext only on Linux
Pipeline #4050 passed with warnings with stages
in 5 minutes and 51 seconds
...@@ -9,10 +9,14 @@ SPDX-License-Identifier: GPL-3.0-or-later ...@@ -9,10 +9,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
""" """
import gettext import gettext
import platform
from pkg_resources import resource_filename from pkg_resources import resource_filename
# Load locale # Load locale
gettext.bindtextdomain('messages', resource_filename("cpasswords", "locale")) if platform.uname().system == 'Linux':
gettext.textdomain('messages') gettext.bindtextdomain('messages', resource_filename("cpasswords", "locale"))
_ = gettext.gettext gettext.textdomain('messages')
_ = gettext.gettext
else:
_ = lambda s: s
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