summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kalderimis <alex.kalderimis@gmail.com>2019-07-24 18:39:30 -0400
committerAlex Kalderimis <alex.kalderimis@gmail.com>2019-07-24 18:49:11 -0400
commit9aa75af34ee5a55d50ca9876269f2c1b4f12b003 (patch)
tree4c84b32ba783c68bec80e9b2609697a229983ee8
parent7fa0c7662b88efa72d29087a273f0b6c1e484b3e (diff)
downloadgitlab-ce-9aa75af34ee5a55d50ca9876269f2c1b4f12b003.tar.gz
Fix incorrect use of message interpolation65088-incorrect-message-interpolation-on-project-listing
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/65088
-rw-r--r--app/views/shared/projects/_project.html.haml4
-rw-r--r--changelogs/unreleased/65088-incorrect-message-interpolation-on-project-listing.yml5
-rw-r--r--spec/features/users/user_browses_projects_on_user_page_spec.rb13
3 files changed, 21 insertions, 1 deletions
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index c4d1bdad2c4..f40a9cffb29 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -89,4 +89,6 @@
%span.icon-wrapper.pipeline-status
= render 'ci/status/icon', status: project.commit.last_pipeline.detailed_status(current_user), type: 'commit', tooltip_placement: 'top', path: pipeline_path
.updated-note
- %span #{_('Updated')} #{updated_tooltip}
+ %span
+ = _('Updated')
+ = updated_tooltip
diff --git a/changelogs/unreleased/65088-incorrect-message-interpolation-on-project-listing.yml b/changelogs/unreleased/65088-incorrect-message-interpolation-on-project-listing.yml
new file mode 100644
index 00000000000..dd74b8443bc
--- /dev/null
+++ b/changelogs/unreleased/65088-incorrect-message-interpolation-on-project-listing.yml
@@ -0,0 +1,5 @@
+---
+title: Fix incorrect use of message interpolation
+merge_request: 31121
+author:
+type: fixed
diff --git a/spec/features/users/user_browses_projects_on_user_page_spec.rb b/spec/features/users/user_browses_projects_on_user_page_spec.rb
index 6a9b281fb4c..5768f42c888 100644
--- a/spec/features/users/user_browses_projects_on_user_page_spec.rb
+++ b/spec/features/users/user_browses_projects_on_user_page_spec.rb
@@ -53,6 +53,19 @@ describe 'Users > User browses projects on user page', :js do
expect(page).to have_content(project2.name)
end
+ it 'does not have incorrectly interpolated message', :js do
+ project = create(:project, namespace: user.namespace, updated_at: 2.minutes.since)
+
+ sign_in(user)
+ visit user_path(user)
+ click_nav_link('Personal projects')
+
+ wait_for_requests
+
+ expect(page).to have_content(project.name)
+ expect(page).not_to have_content("_('Updated')")
+ end
+
context 'when not signed in' do
it 'renders user public project' do
visit user_path(user)