Skip to content
Snippets Groups Projects
Commit 2c8ebc9d authored by Dzmitry (Dima) Meshcharakou's avatar Dzmitry (Dima) Meshcharakou
Browse files
parents 0105093e cd926970
No related branches found
No related tags found
1 merge request!135754Update locked issuable text
Pipeline #1067088557 passed
Showing
with 88 additions and 73 deletions
......@@ -20,9 +20,12 @@ export default {
},
computed: {
title() {
return sprintf(__('This %{issuable} is locked. Only project members can comment.'), {
issuable: issuableTypeText[this.issuableType],
});
return sprintf(
__('The discussion in this %{issuable} is locked. Only project members can comment.'),
{
issuable: issuableTypeText[this.issuableType],
},
);
},
},
};
......
......@@ -24,7 +24,9 @@ export default {
},
lockedIssueWarning() {
return sprintf(
__('This %{issuableDisplayName} is locked. Only project members can comment.'),
__(
'The discussion in this %{issuableDisplayName} is locked. Only project members can comment.',
),
{ issuableDisplayName: this.issuableDisplayName },
);
},
......
......@@ -27,11 +27,10 @@ export default {
<gl-sprintf
:message="
__(
'Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment.',
'Unlock this discussion? %{strongStart}Everyone%{strongEnd} will be able to comment.',
)
"
>
<template #issuableDisplayName>{{ issuableDisplayName }}</template>
<template #strong="{ content }"
><strong>{{ content }}</strong></template
>
......@@ -42,11 +41,10 @@ export default {
<gl-sprintf
:message="
__(
'Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment.',
'Lock this discussion? Only %{strongStart}project members%{strongEnd} will be able to comment.',
)
"
>
<template #issuableDisplayName>{{ issuableDisplayName }}</template>
<template #strong="{ content }"
><strong>{{ content }}</strong></template
>
......
......@@ -50,12 +50,12 @@ export default {
issueCapitalized: __('Issue'),
mergeRequest: __('merge request'),
mergeRequestCapitalized: __('Merge request'),
lockingMergeRequest: __('Locking %{issuableDisplayName}'),
unlockingMergeRequest: __('Unlocking %{issuableDisplayName}'),
lockMergeRequest: __('Lock %{issuableDisplayName}'),
unlockMergeRequest: __('Unlock %{issuableDisplayName}'),
lockedMessage: __('%{issuableDisplayName} locked.'),
unlockedMessage: __('%{issuableDisplayName} unlocked.'),
lockingMergeRequest: __('Locking discussion'),
unlockingMergeRequest: __('Unlocking discussion'),
lockMergeRequest: __('Lock discussion'),
unlockMergeRequest: __('Unlock discussion'),
lockedMessage: __('Discussion locked.'),
unlockedMessage: __('Discussion unlocked.'),
},
data() {
return {
......@@ -152,7 +152,7 @@ export default {
})
.catch(() => {
const alertMessage = __(
'Something went wrong trying to change the locked state of this %{issuableDisplayName}',
'Something went wrong trying to change the locked state of the discussion',
);
createAlert({
message: sprintf(alertMessage, { issuableDisplayName: this.issuableDisplayName }),
......
......@@ -64,7 +64,7 @@ export default {
});
},
lockedContextText() {
return sprintf(__('This %{noteableTypeText} is locked.'), {
return sprintf(__('The discussion in this %{noteableTypeText} is locked.'), {
noteableTypeText: this.noteableTypeText,
});
},
......@@ -80,7 +80,7 @@ export default {
<gl-sprintf
:message="
__(
'This %{noteableTypeText} is %{confidentialLinkStart}confidential%{confidentialLinkEnd} and %{lockedLinkStart}locked%{lockedLinkEnd}.',
'This %{noteableTypeText} is %{confidentialLinkStart}confidential%{confidentialLinkEnd} and its %{lockedLinkStart}discussion is locked%{lockedLinkEnd}.',
)
"
>
......
......@@ -437,7 +437,7 @@ def add_email_participants(body)
def discussion_lock
action = noteable.discussion_locked? ? 'locked' : 'unlocked'
body = "#{action} this #{noteable.class.to_s.titleize.downcase}"
body = "#{action} the discussion in this #{noteable.class.to_s.titleize.downcase}"
if action == 'locked'
track_issue_event(:track_issue_locked_action)
......
......@@ -5,7 +5,7 @@
.issuable-note-warning
= sprite_icon('lock', css_class: 'icon')
%span
= _('This merge request is locked.')
= _('The discussion in this merge request is locked.')
= _('Only project members can comment.')
.md-area.position-relative
......
......@@ -156,12 +156,12 @@ Prerequisite:
To lock an issue or merge request:
1. On the right sidebar, next to **Lock issue** or **Lock merge request**, select **Edit**.
1. On the right sidebar, next to **Lock discussion**, select **Edit**.
1. On the confirmation dialog, select **Lock**.
Notes are added to the page details.
If an issue or merge request is locked and closed, you cannot reopen it.
If an issue or merge request is closed with a locked discussion, then you cannot reopen it until the discussion is unlocked.
<!-- Delete when the `moved_mr_sidebar` feature flag is removed -->
If you don't see this action on the right sidebar, your project or instance might have [moved sidebar actions](../project/merge_requests/index.md#move-sidebar-actions) enabled.
......
......@@ -792,12 +792,6 @@ msgstr ""
msgid "%{integrations_link_start}Integrations%{link_end} enable you to make third-party applications part of your GitLab workflow. If the available integrations don't meet your needs, consider using a %{webhooks_link_start}webhook%{link_end}."
msgstr ""
 
msgid "%{issuableDisplayName} locked."
msgstr ""
msgid "%{issuableDisplayName} unlocked."
msgstr ""
msgid "%{issuableType} will be removed! Are you sure?"
msgstr ""
 
......@@ -17562,9 +17556,15 @@ msgstr ""
msgid "Discuss a specific suggestion or question."
msgstr ""
 
msgid "Discussion locked."
msgstr ""
msgid "Discussion to reply to cannot be found"
msgstr ""
 
msgid "Discussion unlocked."
msgstr ""
msgid "Disk Usage"
msgstr ""
 
......@@ -28630,15 +28630,15 @@ msgstr ""
msgid "Lock"
msgstr ""
 
msgid "Lock %{issuableDisplayName}"
msgstr ""
msgid "Lock %{issuableType}"
msgstr ""
 
msgid "Lock File?"
msgstr ""
 
msgid "Lock discussion"
msgstr ""
msgid "Lock label after a merge request is merged"
msgstr ""
 
......@@ -28660,7 +28660,7 @@ msgstr ""
msgid "Lock the discussion"
msgstr ""
 
msgid "Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
msgid "Lock this discussion? Only %{strongStart}project members%{strongEnd} will be able to comment."
msgstr ""
 
msgid "Lock to current projects"
......@@ -28678,7 +28678,7 @@ msgstr ""
msgid "Locked the discussion."
msgstr ""
 
msgid "Locking %{issuableDisplayName}"
msgid "Locking discussion"
msgstr ""
 
msgid "Locks the discussion."
......@@ -45534,6 +45534,9 @@ msgstr ""
msgid "Something went wrong on our end. Please try again."
msgstr ""
 
msgid "Something went wrong trying to change the locked state of the discussion"
msgstr ""
msgid "Something went wrong trying to change the locked state of this %{issuableDisplayName}"
msgstr ""
 
......@@ -48032,6 +48035,18 @@ msgstr ""
msgid "The directory has been successfully created."
msgstr ""
 
msgid "The discussion in this %{issuableDisplayName} is locked. Only project members can comment."
msgstr ""
msgid "The discussion in this %{issuable} is locked. Only project members can comment."
msgstr ""
msgid "The discussion in this %{noteableTypeText} is locked."
msgstr ""
msgid "The discussion in this merge request is locked."
msgstr ""
msgid "The domain you entered is misformatted."
msgstr ""
 
......@@ -48834,16 +48849,10 @@ msgstr ""
msgid "This %{issuable} is locked. Only %{strong_open}project members%{strong_close} can comment."
msgstr ""
 
msgid "This %{issuable} is locked. Only project members can comment."
msgstr ""
msgid "This %{issuable} would exceed the maximum number of linked %{issuables} (%{limit})."
msgstr ""
 
msgid "This %{noteableTypeText} is %{confidentialLinkStart}confidential%{confidentialLinkEnd} and %{lockedLinkStart}locked%{lockedLinkEnd}."
msgstr ""
msgid "This %{noteableTypeText} is locked."
msgid "This %{noteableTypeText} is %{confidentialLinkStart}confidential%{confidentialLinkEnd} and its %{lockedLinkStart}discussion is locked%{lockedLinkEnd}."
msgstr ""
 
msgid "This %{viewer} could not be displayed because %{reason}. You can %{options} instead."
......@@ -49299,9 +49308,6 @@ msgstr ""
msgid "This merge request is from an internal project to a public project."
msgstr ""
 
msgid "This merge request is locked."
msgstr ""
msgid "This merge request was merged. To apply this suggestion, edit this file directly."
msgstr ""
 
......@@ -51220,10 +51226,10 @@ msgstr ""
msgid "Unlock"
msgstr ""
 
msgid "Unlock %{issuableDisplayName}"
msgid "Unlock account"
msgstr ""
 
msgid "Unlock account"
msgid "Unlock discussion"
msgstr ""
 
msgid "Unlock more features with GitLab Ultimate"
......@@ -51232,7 +51238,7 @@ msgstr ""
msgid "Unlock the discussion"
msgstr ""
 
msgid "Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
msgid "Unlock this discussion? %{strongStart}Everyone%{strongEnd} will be able to comment."
msgstr ""
 
msgid "Unlocked"
......@@ -51241,7 +51247,7 @@ msgstr ""
msgid "Unlocked the discussion."
msgstr ""
 
msgid "Unlocking %{issuableDisplayName}"
msgid "Unlocking discussion"
msgstr ""
 
msgid "Unlocks the discussion."
......@@ -28,7 +28,7 @@
click_button('Lock')
end
expect(find('#notes')).to have_content('locked this issue')
expect(find('#notes')).to have_content('locked the discussion in this issue')
end
end
......@@ -46,7 +46,7 @@
click_button('Unlock')
end
expect(find('#notes')).to have_content('unlocked this issue')
expect(find('#notes')).to have_content('unlocked the discussion in this issue')
expect(find('.issuable-sidebar')).to have_content('Unlocked')
end
......@@ -101,7 +101,7 @@
page.within('#notes') do
expect(page).not_to have_selector('js-main-target-form')
expect(page.find('.disabled-comments'))
.to have_content('This issue is locked. Only project members can comment.')
.to have_content('The discussion in this issue is locked. Only project members can comment.')
end
end
end
......
......@@ -92,7 +92,7 @@
it 'the user can lock the merge_request' do
find('#new-actions-header-dropdown button').click
expect(page).to have_content('Lock merge request')
expect(page).to have_content('Lock discussion')
end
end
......@@ -105,7 +105,7 @@
it 'the user can unlock the merge_request' do
find('#new-actions-header-dropdown button').click
expect(page).to have_content('Unlock merge request')
expect(page).to have_content('Unlock discussion')
end
end
end
......
......@@ -43,7 +43,7 @@
page.within('.js-vue-notes-event') do
expect(page).not_to have_selector('js-main-target-form')
expect(page.find('.issuable-note-warning'))
.to have_content('This merge request is locked. Only project members can comment.')
.to have_content('The discussion in this merge request is locked. Only project members can comment.')
end
end
end
......
......@@ -39,7 +39,7 @@ describe('LockedBadge component', () => {
it('has title', () => {
expect(findBadge().attributes('title')).toBe(
'This issue is locked. Only project members can comment.',
'The discussion in this issue is locked. Only project members can comment.',
);
});
});
......@@ -9,7 +9,7 @@ exports[`Edit Form Dropdown In issue page when locked the appropriate warning te
class="text"
>
<gl-sprintf-stub
message="Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
message="Unlock this discussion? %{strongStart}Everyone%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
......@@ -28,7 +28,7 @@ exports[`Edit Form Dropdown In issue page when unlocked the appropriate warning
class="text"
>
<gl-sprintf-stub
message="Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
message="Lock this discussion? Only %{strongStart}project members%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
......@@ -46,7 +46,7 @@ exports[`Edit Form Dropdown In merge request page when locked the appropriate wa
class="text"
>
<gl-sprintf-stub
message="Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
message="Unlock this discussion? %{strongStart}Everyone%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
......@@ -65,7 +65,7 @@ exports[`Edit Form Dropdown In merge request page when unlocked the appropriate
class="text"
>
<gl-sprintf-stub
message="Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
message="Lock this discussion? Only %{strongStart}project members%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
......
......@@ -176,8 +176,8 @@ describe('IssuableLockForm', () => {
it.each`
locked | message
${true} | ${'Merge request locked.'}
${false} | ${'Merge request unlocked.'}
${true} | ${'Discussion locked.'}
${false} | ${'Discussion unlocked.'}
`('displays $message when merge request is $locked', async ({ locked, message }) => {
initStore(locked);
......
......@@ -2,7 +2,7 @@
exports[`Issue Warning Component when issue is locked but not confidential renders information about locked issue 1`] = `
<span>
This issue is locked. Only project members can comment.
The discussion in this issue is locked. Only project members can comment.
<gl-link-stub
href="locked-path"
target="_blank"
......@@ -34,12 +34,12 @@ exports[`Issue Warning Component when noteable is locked and confidential render
>
confidential
</gl-link-stub>
and
and its
<gl-link-stub
href=""
target="_blank"
>
locked
discussion is locked
</gl-link-stub>
.
</span>
......
......@@ -126,12 +126,14 @@ describe('Issue Warning Component', () => {
});
it('renders confidential & locked messages with noteable "issue"', () => {
expect(findLockedBlock(wrapperLocked).text()).toContain('This issue is locked.');
expect(findLockedBlock(wrapperLocked).text()).toContain(
'The discussion in this issue is locked.',
);
expect(findConfidentialBlock(wrapperConfidential).text()).toContain(
'This is a confidential issue.',
);
expect(findLockedAndConfidentialBlock(wrapperLockedAndConfidential).text()).toContain(
'This issue is confidential and locked.',
'This issue is confidential and its discussion is locked.',
);
});
......@@ -147,7 +149,9 @@ describe('Issue Warning Component', () => {
});
await nextTick();
expect(findLockedBlock(wrapperLocked).text()).toContain('This epic is locked.');
expect(findLockedBlock(wrapperLocked).text()).toContain(
'The discussion in this epic is locked.',
);
await nextTick();
expect(findConfidentialBlock(wrapperConfidential).text()).toContain(
......@@ -156,7 +160,7 @@ describe('Issue Warning Component', () => {
await nextTick();
expect(findLockedAndConfidentialBlock(wrapperLockedAndConfidential).text()).toContain(
'This epic is confidential and locked.',
'This epic is confidential and its discussion is locked.',
);
});
......@@ -172,7 +176,9 @@ describe('Issue Warning Component', () => {
});
await nextTick();
expect(findLockedBlock(wrapperLocked).text()).toContain('This merge request is locked.');
expect(findLockedBlock(wrapperLocked).text()).toContain(
'The discussion in this merge request is locked.',
);
await nextTick();
expect(findConfidentialBlock(wrapperConfidential).text()).toContain(
......@@ -181,7 +187,7 @@ describe('Issue Warning Component', () => {
await nextTick();
expect(findLockedAndConfidentialBlock(wrapperLockedAndConfidential).text()).toContain(
'This merge request is confidential and locked.',
'This merge request is confidential and its discussion is locked.',
);
});
});
......
......@@ -42,7 +42,7 @@
context 'on issuable update' do
it_behaves_like 'system note creation', { title: 'New title' }, 'changed title'
it_behaves_like 'system note creation', { description: 'New description' }, 'changed the description'
it_behaves_like 'system note creation', { discussion_locked: true }, 'locked this issue'
it_behaves_like 'system note creation', { discussion_locked: true }, 'locked the discussion in this issue'
it_behaves_like 'system note creation', { time_estimate: 5 }, 'changed time estimate'
context 'when new label is added' do
......
......@@ -491,9 +491,9 @@ def update_issue(opts)
end
it 'creates system note about discussion lock' do
note = find_note('locked this issue')
note = find_note('locked the discussion in this issue')
expect(note.note).to eq 'locked this issue'
expect(note.note).to eq 'locked the discussion in this issue'
end
end
......
......@@ -351,10 +351,10 @@ def update_merge_request(opts)
end
it 'creates system note about discussion lock' do
note = find_note('locked this merge request')
note = find_note('locked the discussion in this merge request')
expect(note).not_to be_nil
expect(note.note).to eq 'locked this merge request'
expect(note.note).to eq 'locked the discussion in this merge request'
end
context 'when current user cannot admin issues in the project' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment