Commit f4dca66f authored by Phil Hughes's avatar Phil Hughes

Merge branch 'vs-fix-account-delete-plural-msg' into 'master'

Fix plural message in account deletion section

See merge request gitlab-org/gitlab!32868
parents 36845e07 105c69a6
......@@ -8,4 +8,4 @@
- personal_projects_count = user.personal_projects.count
- unless personal_projects_count.zero?
%li
= n_('personal project will be removed and cannot be restored', '%d personal projects will be removed and cannot be restored', personal_projects_count)
= n_('%d personal project will be removed and cannot be restored.', '%d personal projects will be removed and cannot be restored.', personal_projects_count) % personal_projects_count
---
title: Fix plural message in account deletion section
merge_request: 32868
author:
type: fixed
......@@ -189,6 +189,11 @@ msgid_plural "%d more comments"
msgstr[0] ""
msgstr[1] ""
msgid "%d personal project will be removed and cannot be restored."
msgid_plural "%d personal projects will be removed and cannot be restored."
msgstr[0] ""
msgstr[1] ""
msgid "%d project"
msgid_plural "%d projects"
msgstr[0] ""
......@@ -26573,11 +26578,6 @@ msgstr ""
msgid "personal access tokens"
msgstr ""
msgid "personal project will be removed and cannot be restored"
msgid_plural "%d personal projects will be removed and cannot be restored"
msgstr[0] ""
msgstr[1] ""
msgid "pipeline"
msgstr ""
......
......@@ -56,6 +56,37 @@ describe 'Profile > Account', :js do
end
end
end
describe 'Delete account' do
before do
create_list(:project, number_of_projects, namespace: user.namespace)
visit profile_account_path
end
context 'when there are no personal projects' do
let(:number_of_projects) { 0 }
it 'does not show personal projects removal message' do
expect(page).not_to have_content(/\d personal projects? will be removed and cannot be restored/)
end
end
context 'when one personal project exists' do
let(:number_of_projects) { 1 }
it 'does show personal project removal message' do
expect(page).to have_content('1 personal project will be removed and cannot be restored')
end
end
context 'when more than one personal projects exists' do
let(:number_of_projects) { 3 }
it 'shows pluralized personal project removal message' do
expect(page).to have_content('3 personal projects will be removed and cannot be restored')
end
end
end
end
def update_username(new_username)
......
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