Skip to content
Snippets Groups Projects
Commit ad9ea7e7 authored by Benjamin Graillot's avatar Benjamin Graillot
Browse files

[locale] Use default strings when not on Linux

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