summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Tsiolis <tsiolis.g@gmail.com>2018-11-20 12:38:52 +0200
committerGeorge Tsiolis <tsiolis.g@gmail.com>2018-11-20 12:38:52 +0200
commit58b3b7732bc96ce4c3f113b79733ec34f7465047 (patch)
treeab614c59330d3621aa2e98922affb91fe37c6b85
parent320ae6223d26e3fa565cb18d5d0b7d571032d948 (diff)
downloadgitlab-ce-58b3b7732bc96ce4c3f113b79733ec34f7465047.tar.gz
Externalize strings from `/app/views/projects/diffs`
-rw-r--r--app/views/projects/diffs/_collapsed.html.haml4
-rw-r--r--app/views/projects/diffs/_diffs.html.haml2
-rw-r--r--app/views/projects/diffs/_file.html.haml2
-rw-r--r--app/views/projects/diffs/_file_header.html.haml2
-rw-r--r--app/views/projects/diffs/_render_error.html.haml2
-rw-r--r--app/views/projects/diffs/_stats.html.haml2
-rw-r--r--app/views/projects/diffs/_text_file.html.haml2
-rw-r--r--app/views/projects/diffs/_warning.html.haml14
-rw-r--r--app/views/projects/diffs/viewers/_added.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_deleted.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_mode_changed.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_no_preview.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_not_diffable.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_renamed.html.haml2
-rw-r--r--locale/gitlab.pot33
15 files changed, 53 insertions, 22 deletions
diff --git a/app/views/projects/diffs/_collapsed.html.haml b/app/views/projects/diffs/_collapsed.html.haml
index 9bd1255fe00..94dcda38bd6 100644
--- a/app/views/projects/diffs/_collapsed.html.haml
+++ b/app/views/projects/diffs/_collapsed.html.haml
@@ -1,5 +1,5 @@
- diff_file = viewer.diff_file
- url = url_for(safe_params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path, file_identifier: diff_file.file_identifier))
.nothing-here-block.diff-collapsed{ data: { diff_for_path: url } }
- This diff is collapsed.
- %button.click-to-expand.btn.btn-link Click to expand it.
+ = _("This diff is collapsed.")
+ %button.click-to-expand.btn.btn-link= _("Click to expand it.")
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index 077c6c68f7e..9de3c2db6e7 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -8,7 +8,7 @@
.files-changed-inner
.inline-parallel-buttons.d-none.d-sm-none.d-md-block
- if !diffs_expanded? && diff_files.any? { |diff_file| diff_file.collapsed? }
- = link_to 'Expand all', url_for(safe_params.merge(expanded: 1, format: nil)), class: 'btn btn-default'
+ = link_to _('Expand all'), url_for(safe_params.merge(expanded: 1, format: nil)), class: 'btn btn-default'
- if show_whitespace_toggle
- if current_controller?(:commit)
= commit_diff_whitespace_link(diffs.project, @commit, class: 'd-none d-sm-inline-block')
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index b4df654c839..1f90acaabcc 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -12,7 +12,7 @@
- blob = diff_file.blob
.file-actions.d-none.d-sm-block
- if blob&.readable_text?
- = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: "Toggle comments for this file", disabled: @diff_notes_disabled do
+ = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: _("Toggle comments for this file"), disabled: @diff_notes_disabled do
= icon('comment')
\
- if editable_diff?(diff_file)
diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml
index 4cb04d744dc..6a1bff8640c 100644
--- a/app/views/projects/diffs/_file_header.html.haml
+++ b/app/views/projects/diffs/_file_header.html.haml
@@ -28,7 +28,7 @@
= diff_file.file_path
- if diff_file.deleted_file?
- deleted
+ = _("deleted")
= copy_file_path_button(diff_file.file_path)
diff --git a/app/views/projects/diffs/_render_error.html.haml b/app/views/projects/diffs/_render_error.html.haml
index 47a9ac3ee6b..c3dc47a56a7 100644
--- a/app/views/projects/diffs/_render_error.html.haml
+++ b/app/views/projects/diffs/_render_error.html.haml
@@ -1,5 +1,5 @@
.nothing-here-block
- This #{viewer.switcher_title} could not be displayed because #{diff_render_error_reason(viewer)}.
+ = _("This %{viewer} could not be displayed because %{reason}.") % { viewer: viewer.switcher_title, reason: diff_render_error_reason(viewer) }
You can
= diff_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml
index 229a4574eeb..c9057f385da 100644
--- a/app/views/projects/diffs/_stats.html.haml
+++ b/app/views/projects/diffs/_stats.html.haml
@@ -38,4 +38,4 @@
\-#{diff_file.removed_lines}
%li.dropdown-menu-empty-item.hidden
%a
- No files found.
+ = _("No files found.")
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index bc9f6c71fa8..56427a74d56 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -1,7 +1,7 @@
- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
- if too_big
.suppressed-container
- %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
+ %a.show-suppressed-diff.js-show-suppressed-diff= _("Changes suppressed. Click to show.")
%table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' }
= render partial: "projects/diffs/line",
diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml
index abe494f2974..2eef599cf84 100644
--- a/app/views/projects/diffs/_warning.html.haml
+++ b/app/views/projects/diffs/_warning.html.haml
@@ -1,14 +1,12 @@
.alert.alert-warning
%h4
- Too many changes to show.
+ = _("Too many changes to show.")
.float-right
- if current_controller?(:commit)
- = link_to "Plain diff", project_commit_path(@project, @commit, format: :diff), class: "btn btn-sm"
- = link_to "Email patch", project_commit_path(@project, @commit, format: :patch), class: "btn btn-sm"
+ = link_to _("Plain diff"), project_commit_path(@project, @commit, format: :diff), class: "btn btn-sm"
+ = link_to _("Email patch"), project_commit_path(@project, @commit, format: :patch), class: "btn btn-sm"
- elsif current_controller?('projects/merge_requests/diffs') && @merge_request&.persisted?
- = link_to "Plain diff", merge_request_path(@merge_request, format: :diff), class: "btn btn-sm"
- = link_to "Email patch", merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
+ = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn btn-sm"
+ = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
%p
- To preserve performance only
- %strong #{diff_files.size} of #{diff_files.real_size}
- files are displayed.
+ = _("To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size }
diff --git a/app/views/projects/diffs/viewers/_added.html.haml b/app/views/projects/diffs/viewers/_added.html.haml
index 8004fe16688..f4c574a018f 100644
--- a/app/views/projects/diffs/viewers/_added.html.haml
+++ b/app/views/projects/diffs/viewers/_added.html.haml
@@ -1,2 +1,2 @@
.nothing-here-block
- File added
+ = _("File added")
diff --git a/app/views/projects/diffs/viewers/_deleted.html.haml b/app/views/projects/diffs/viewers/_deleted.html.haml
index 0ac7b4ca8f6..b82ca4d0787 100644
--- a/app/views/projects/diffs/viewers/_deleted.html.haml
+++ b/app/views/projects/diffs/viewers/_deleted.html.haml
@@ -1,2 +1,2 @@
.nothing-here-block
- File deleted
+ = _("File deleted")
diff --git a/app/views/projects/diffs/viewers/_mode_changed.html.haml b/app/views/projects/diffs/viewers/_mode_changed.html.haml
index 69bc96bbdad..a8d6f5fe400 100644
--- a/app/views/projects/diffs/viewers/_mode_changed.html.haml
+++ b/app/views/projects/diffs/viewers/_mode_changed.html.haml
@@ -1,3 +1,3 @@
- diff_file = viewer.diff_file
.nothing-here-block
- File mode changed from #{diff_file.a_mode} to #{diff_file.b_mode}
+ = _("File mode changed from %{a_mode} to %{b_mode}") % { a_mode: diff_file.a_mode, b_mode: diff_file.b_mode }
diff --git a/app/views/projects/diffs/viewers/_no_preview.html.haml b/app/views/projects/diffs/viewers/_no_preview.html.haml
index befe070af2b..b763ac34bf8 100644
--- a/app/views/projects/diffs/viewers/_no_preview.html.haml
+++ b/app/views/projects/diffs/viewers/_no_preview.html.haml
@@ -1,2 +1,2 @@
.nothing-here-block
- No preview for this file type
+ = _("No preview for this file type")
diff --git a/app/views/projects/diffs/viewers/_not_diffable.html.haml b/app/views/projects/diffs/viewers/_not_diffable.html.haml
index b2c677ec59c..7c55e272f56 100644
--- a/app/views/projects/diffs/viewers/_not_diffable.html.haml
+++ b/app/views/projects/diffs/viewers/_not_diffable.html.haml
@@ -1,2 +1,2 @@
.nothing-here-block
- This diff was suppressed by a .gitattributes entry.
+ = _("This diff was suppressed by a .gitattributes entry.")
diff --git a/app/views/projects/diffs/viewers/_renamed.html.haml b/app/views/projects/diffs/viewers/_renamed.html.haml
index ef05ee38d8d..b7336c356fe 100644
--- a/app/views/projects/diffs/viewers/_renamed.html.haml
+++ b/app/views/projects/diffs/viewers/_renamed.html.haml
@@ -1,2 +1,2 @@
.nothing-here-block
- File moved
+ = _("File moved")
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 709560a3246..9b9057fb460 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1169,6 +1169,9 @@ msgstr ""
msgid "Changes are shown as if the <b>source</b> revision was being merged into the <b>target</b> revision."
msgstr ""
+msgid "Changes suppressed. Click to show."
+msgstr ""
+
msgid "Charts"
msgstr ""
@@ -2840,6 +2843,18 @@ msgstr ""
msgid "Fields on this page are now uneditable, you can configure"
msgstr ""
+msgid "File added"
+msgstr ""
+
+msgid "File deleted"
+msgstr ""
+
+msgid "File mode changed from %{a_mode} to %{b_mode}"
+msgstr ""
+
+msgid "File moved"
+msgstr ""
+
msgid "File templates"
msgstr ""
@@ -4147,6 +4162,9 @@ msgstr ""
msgid "No other labels with such name or description"
msgstr ""
+msgid "No preview for this file type"
+msgstr ""
+
msgid "No prioritised labels with such name or description"
msgstr ""
@@ -6224,6 +6242,9 @@ msgstr ""
msgid "Third party offers"
msgstr ""
+msgid "This %{viewer} could not be displayed because %{reason}."
+msgstr ""
+
msgid "This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area."
msgstr ""
@@ -6242,6 +6263,9 @@ msgstr ""
msgid "This diff is collapsed."
msgstr ""
+msgid "This diff was suppressed by a .gitattributes entry."
+msgstr ""
+
msgid "This directory"
msgstr ""
@@ -6597,6 +6621,9 @@ msgstr ""
msgid "To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here."
msgstr ""
+msgid "To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed."
+msgstr ""
+
msgid "To start serving your jobs you can add Runners to your group"
msgstr ""
@@ -6618,6 +6645,9 @@ msgstr ""
msgid "Toggle Sidebar"
msgstr ""
+msgid "Toggle comments for this file"
+msgstr ""
+
msgid "Toggle commit description"
msgstr ""
@@ -7307,6 +7337,9 @@ msgid_plural "days"
msgstr[0] ""
msgstr[1] ""
+msgid "deleted"
+msgstr ""
+
msgid "deploy token"
msgstr ""