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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9b533937
Commit
9b533937
authored
May 07, 2018
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate if changed translations are checked in
parent
a9ebcfa5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
6 deletions
+42
-6
lib/tasks/gettext.rake
lib/tasks/gettext.rake
+26
-0
lib/tasks/lint.rake
lib/tasks/lint.rake
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+15
-6
No files found.
lib/tasks/gettext.rake
View file @
9b533937
...
...
@@ -50,6 +50,32 @@ namespace :gettext do
end
end
task
:updated_check
do
# Removeing all pre-translated files speeds up `gettext:find` as the
# files don't need to be merged.
`rm locale/*/gitlab.po`
# `gettext:find` writes touches to temp files to `stderr` which would cause
# `static-analysis` to report failures. We can ignore these
silence_stream
(
STDERR
)
{
Rake
::
Task
[
'gettext:find'
].
invoke
}
changed_files
=
`git diff --name-only`
.
lines
.
map
(
&
:strip
)
# reset the locale folder for potential next tasks
`git checkout locale`
if
changed_files
.
include?
(
'locale/gitlab.pot'
)
raise
<<~
MSG
Newly translated strings found, please add them to `gitlab.pot` by running:
bundle exec rake gettext:find; git checkout locale/*/gitlab.po;
Then check in the resulting `locale/gitlab.pot`
MSG
end
end
def
report_errors_for_file
(
file
,
errors_for_file
)
puts
"Errors in `
#{
file
}
`:"
...
...
lib/tasks/lint.rake
View file @
9b533937
...
...
@@ -27,6 +27,7 @@ unless Rails.env.production?
scss_lint
flay
gettext:lint
gettext:updated_check
lint:static_verification
]
.
each
do
|
task
|
pid
=
Process
.
fork
do
...
...
locale/gitlab.pot
View file @
9b533937
...
...
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-1
2 18:57+10
00\n"
"PO-Revision-Date: 2018-06-1
2 18:57+10
00\n"
"POT-Creation-Date: 2018-06-1
3 14:05+02
00\n"
"PO-Revision-Date: 2018-06-1
3 14:05+02
00\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
...
...
@@ -133,12 +133,12 @@ msgid "- show less"
msgstr ""
msgid "1 %{type} addition"
msgid_plural "%
d
%{type} additions"
msgid_plural "%
{count}
%{type} additions"
msgstr[0] ""
msgstr[1] ""
msgid "1 %{type} modification"
msgid_plural "%
d
%{type} modifications"
msgid_plural "%
{count}
%{type} modifications"
msgstr[0] ""
msgstr[1] ""
...
...
@@ -2252,10 +2252,10 @@ msgstr ""
msgid "Gitaly"
msgstr ""
msgid "Gitaly
|Addres
s"
msgid "Gitaly
Server
s"
msgstr ""
msgid "Gitaly
Server
s"
msgid "Gitaly
|Addres
s"
msgstr ""
msgid "Go Back"
...
...
@@ -2419,6 +2419,15 @@ msgstr ""
msgid "If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>."
msgstr ""
msgid "ImageDiffViewer|2-up"
msgstr ""
msgid "ImageDiffViewer|Onion skin"
msgstr ""
msgid "ImageDiffViewer|Swipe"
msgstr ""
msgid "Import"
msgstr ""
...
...
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