Fix incorrect use of message interpolation

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/65088
This commit is contained in:
Alex Kalderimis 2019-07-24 18:39:30 -04:00
parent 7fa0c7662b
commit 9aa75af34e
3 changed files with 21 additions and 1 deletions

View File

@ -89,4 +89,6 @@
%span.icon-wrapper.pipeline-status %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 = render 'ci/status/icon', status: project.commit.last_pipeline.detailed_status(current_user), type: 'commit', tooltip_placement: 'top', path: pipeline_path
.updated-note .updated-note
%span #{_('Updated')} #{updated_tooltip} %span
= _('Updated')
= updated_tooltip

View File

@ -0,0 +1,5 @@
---
title: Fix incorrect use of message interpolation
merge_request: 31121
author:
type: fixed

View File

@ -53,6 +53,19 @@ describe 'Users > User browses projects on user page', :js do
expect(page).to have_content(project2.name) expect(page).to have_content(project2.name)
end 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 context 'when not signed in' do
it 'renders user public project' do it 'renders user public project' do
visit user_path(user) visit user_path(user)