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
c7d953bd
Commit
c7d953bd
authored
4 years ago
by
me5na7qbjqbrp
Browse files
Options
Downloads
Plain Diff
Merge branch 'locale' into 'dev'
Use GNU gettext only on Linux See merge request
!11
parents
26381add
ad9ea7e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Use GNU gettext only on Linux
Pipeline
#4050
passed with warnings with stages
in 5 minutes and 51 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 @
c7d953bd
...
@@ -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
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