Commit 488d7d1f authored by Stan Hu's avatar Stan Hu

Fix broken templated "Too many changes to show" text

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23230
broke the external string in 11.6. This fixes that and
adds a spec.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56138
parent 4a6c7661
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
= 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 <strong>%{display_size} of ${real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size } = _("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 }
---
title: Fix broken templated "Too many changes to show" text
merge_request: 24282
author:
type: fixed
...@@ -7200,7 +7200,7 @@ msgstr "" ...@@ -7200,7 +7200,7 @@ 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." msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr "" 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"
......
...@@ -87,6 +87,21 @@ describe "Compare", :js do ...@@ -87,6 +87,21 @@ describe "Compare", :js do
expect(find(".js-compare-from-dropdown .dropdown-content")).to have_selector("li", count: 3) expect(find(".js-compare-from-dropdown .dropdown-content")).to have_selector("li", count: 3)
end end
context 'when commit has overflow', :js do
it 'displays warning' do
visit project_compare_index_path(project, from: "feature", to: "master")
allow(Commit).to receive(:max_diff_options).and_return(max_files: 3)
allow_any_instance_of(DiffHelper).to receive(:render_overflow_warning?).and_return(true)
click_button('Compare')
page.within('.alert') do
expect(page).to have_text("Too many changes to show. To preserve performance only 3 of 3+ files are displayed.")
end
end
end
end end
describe "tags" do describe "tags" do
......
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