Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fa73e107
Commit
fa73e107
authored
Sep 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
67c116c2
08b06133
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lib/gitlab/i18n/po_linter.rb
lib/gitlab/i18n/po_linter.rb
+4
-4
spec/fixtures/valid.po
spec/fixtures/valid.po
+5
-0
No files found.
lib/gitlab/i18n/po_linter.rb
View file @
fa73e107
...
...
@@ -170,13 +170,13 @@ module Gitlab
end
def
translate_plural
(
entry
)
used_variables
=
entry
.
plural_id
.
scan
(
VARIABLE_REGEX
)
variables
=
fill_in_variables
(
used_variables
)
numbers_covering_all_plurals
.
map
do
|
number
|
translation
=
FastGettext
::
Translation
.
n_
(
entry
.
msgid
,
entry
.
plural_id
,
number
)
index
=
index_for_pluralization
(
number
)
used_variables
=
index
==
0
?
entry
.
msgid
.
scan
(
VARIABLE_REGEX
)
:
entry
.
plural_id
.
scan
(
VARIABLE_REGEX
)
variables
=
fill_in_variables
(
used_variables
)
translation
%
variables
if
used_
variables
.
any?
translation
%
variables
if
variables
.
any?
end
end
...
...
spec/fixtures/valid.po
View file @
fa73e107
...
...
@@ -1128,3 +1128,8 @@ msgid "parent"
msgid_plural "parents"
msgstr[0] "padre"
msgstr[1] "padres"
msgid "CycleAnalytics|%{stageName}"
msgid_plural "CycleAnalytics|%d stages selected"
msgstr[0] "%{stageName}"
msgstr[1] "%d stages selected"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment