Commit 58b3b773 authored by George Tsiolis's avatar George Tsiolis

Externalize strings from `/app/views/projects/diffs`

parent 320ae622
- diff_file = viewer.diff_file - 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)) - 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 } } .nothing-here-block.diff-collapsed{ data: { diff_for_path: url } }
This diff is collapsed. = _("This diff is collapsed.")
%button.click-to-expand.btn.btn-link Click to expand it. %button.click-to-expand.btn.btn-link= _("Click to expand it.")
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.files-changed-inner .files-changed-inner
.inline-parallel-buttons.d-none.d-sm-none.d-md-block .inline-parallel-buttons.d-none.d-sm-none.d-md-block
- if !diffs_expanded? && diff_files.any? { |diff_file| diff_file.collapsed? } - 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 show_whitespace_toggle
- if current_controller?(:commit) - if current_controller?(:commit)
= commit_diff_whitespace_link(diffs.project, @commit, class: 'd-none d-sm-inline-block') = commit_diff_whitespace_link(diffs.project, @commit, class: 'd-none d-sm-inline-block')
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- blob = diff_file.blob - blob = diff_file.blob
.file-actions.d-none.d-sm-block .file-actions.d-none.d-sm-block
- if blob&.readable_text? - 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') = icon('comment')
\ \
- if editable_diff?(diff_file) - if editable_diff?(diff_file)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
= diff_file.file_path = diff_file.file_path
- if diff_file.deleted_file? - if diff_file.deleted_file?
deleted = _("deleted")
= copy_file_path_button(diff_file.file_path) = copy_file_path_button(diff_file.file_path)
......
.nothing-here-block .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 You can
= diff_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe = diff_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe
......
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
\-#{diff_file.removed_lines} \-#{diff_file.removed_lines}
%li.dropdown-menu-empty-item.hidden %li.dropdown-menu-empty-item.hidden
%a %a
No files found. = _("No files found.")
- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES - too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
- if too_big - if too_big
.suppressed-container .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' : '' } %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", = render partial: "projects/diffs/line",
......
.alert.alert-warning .alert.alert-warning
%h4 %h4
Too many changes to show. = _("Too many changes to show.")
.float-right .float-right
- if current_controller?(:commit) - if current_controller?(:commit)
= link_to "Plain diff", project_commit_path(@project, @commit, format: :diff), 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" = 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? - 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 _("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 _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
%p %p
To preserve performance only = _("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 }
%strong #{diff_files.size} of #{diff_files.real_size}
files are displayed.
.nothing-here-block .nothing-here-block
File added = _("File added")
.nothing-here-block .nothing-here-block
File deleted = _("File deleted")
- diff_file = viewer.diff_file - diff_file = viewer.diff_file
.nothing-here-block .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 }
.nothing-here-block .nothing-here-block
No preview for this file type = _("No preview for this file type")
.nothing-here-block .nothing-here-block
This diff was suppressed by a .gitattributes entry. = _("This diff was suppressed by a .gitattributes entry.")
.nothing-here-block .nothing-here-block
File moved = _("File moved")
...@@ -1169,6 +1169,9 @@ msgstr "" ...@@ -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." msgid "Changes are shown as if the <b>source</b> revision was being merged into the <b>target</b> revision."
msgstr "" msgstr ""
msgid "Changes suppressed. Click to show."
msgstr ""
msgid "Charts" msgid "Charts"
msgstr "" msgstr ""
...@@ -2840,6 +2843,18 @@ msgstr "" ...@@ -2840,6 +2843,18 @@ msgstr ""
msgid "Fields on this page are now uneditable, you can configure" msgid "Fields on this page are now uneditable, you can configure"
msgstr "" 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" msgid "File templates"
msgstr "" msgstr ""
...@@ -4147,6 +4162,9 @@ msgstr "" ...@@ -4147,6 +4162,9 @@ msgstr ""
msgid "No other labels with such name or description" msgid "No other labels with such name or description"
msgstr "" msgstr ""
msgid "No preview for this file type"
msgstr ""
msgid "No prioritised labels with such name or description" msgid "No prioritised labels with such name or description"
msgstr "" msgstr ""
...@@ -6224,6 +6242,9 @@ msgstr "" ...@@ -6224,6 +6242,9 @@ msgstr ""
msgid "Third party offers" msgid "Third party offers"
msgstr "" 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." msgid "This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area."
msgstr "" msgstr ""
...@@ -6242,6 +6263,9 @@ msgstr "" ...@@ -6242,6 +6263,9 @@ msgstr ""
msgid "This diff is collapsed." msgid "This diff is collapsed."
msgstr "" msgstr ""
msgid "This diff was suppressed by a .gitattributes entry."
msgstr ""
msgid "This directory" msgid "This directory"
msgstr "" msgstr ""
...@@ -6597,6 +6621,9 @@ 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." 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 "" 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" msgid "To start serving your jobs you can add Runners to your group"
msgstr "" msgstr ""
...@@ -6618,6 +6645,9 @@ msgstr "" ...@@ -6618,6 +6645,9 @@ msgstr ""
msgid "Toggle Sidebar" msgid "Toggle Sidebar"
msgstr "" msgstr ""
msgid "Toggle comments for this file"
msgstr ""
msgid "Toggle commit description" msgid "Toggle commit description"
msgstr "" msgstr ""
...@@ -7307,6 +7337,9 @@ msgid_plural "days" ...@@ -7307,6 +7337,9 @@ msgid_plural "days"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "deleted"
msgstr ""
msgid "deploy token" msgid "deploy token"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment