Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Crans Passwords
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
Crans Passwords
Commits
ad9ea7e7
Commit
ad9ea7e7
authored
4 years ago
by
Benjamin Graillot
Browse files
Options
Downloads
Patches
Plain Diff
[locale] Use default strings when not on Linux
parent
f2c66ccb
No related branches found
No related tags found
1 merge request
!11
Use GNU gettext only on Linux
Pipeline
#3279
passed with warnings with stages
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpasswords/locale.py
+7
-3
7 additions, 3 deletions
cpasswords/locale.py
with
7 additions
and
3 deletions
cpasswords/locale.py
+
7
−
3
View file @
ad9ea7e7
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment