Commit 1fedd4af authored by Phil Hughes's avatar Phil Hughes

Merge branch '343780-aqualls-adds-commit-string' into 'master'

Standardize merge details messaging

See merge request gitlab-org/gitlab!73871
parents 2d1e7c20 9ea97063
......@@ -40,9 +40,9 @@ export default {
},
message() {
return this.isFastForwardEnabled
? s__('mrWidgetCommitsAdded|%{commitCount} will be added to %{targetBranch}.')
? s__('mrWidgetCommitsAdded|Adds %{commitCount} to %{targetBranch}.')
: s__(
'mrWidgetCommitsAdded|%{commitCount} and %{mergeCommitCount} will be added to %{targetBranch}%{squashedCommits}.',
'mrWidgetCommitsAdded|Adds %{commitCount} and %{mergeCommitCount} to %{targetBranch}%{squashedCommits}.',
);
},
textDecorativeComponent() {
......@@ -69,7 +69,7 @@ export default {
</template>
<template #squashedCommits>
<template v-if="glFeatures.restructuredMrWidget && isSquashEnabled">
{{ __('(commits will be squashed)') }}</template
{{ n__('(squashes %d commit)', '(squashes %d commits)', commitsCount) }}</template
></template
>
</gl-sprintf>
......
......@@ -4,7 +4,7 @@ import { __ } from '../../locale';
export default {
i18n: {
removesBranchText: __('The source branch will be deleted'),
removesBranchText: __('Deletes the source branch'),
tooltipTitle: __('A user with write access to the source branch selected this option'),
},
components: {
......
......@@ -177,10 +177,10 @@ export default {
</h4>
<section class="mr-info-list">
<p v-if="shouldRemoveSourceBranch">
{{ s__('mrWidget|The source branch will be deleted') }}
{{ s__('mrWidget|Deletes the source branch') }}
</p>
<p v-else class="gl-display-flex">
<span class="gl-mr-3">{{ s__('mrWidget|The source branch will not be deleted') }}</span>
<span class="gl-mr-3">{{ s__('mrWidget|Does not delete the source branch') }}</span>
<gl-button
v-if="canRemoveSourceBranch"
:loading="isRemovingSourceBranch"
......
......@@ -32,7 +32,7 @@ export default {
</h4>
<section class="mr-info-list">
<p>
{{ s__('mrWidget|The changes will be merged into') }}
{{ s__('mrWidget|Merges changes into') }}
<span class="label-branch">
<a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a>
</span>
......
......@@ -710,10 +710,10 @@ export default {
</li>
<li class="gl-line-height-normal">
<template v-if="removeSourceBranch">
{{ __('Source branch will be deleted.') }}
{{ __('Deletes the source branch.') }}
</template>
<template v-else>
{{ __('Source branch will not be deleted.') }}
{{ __('Does not delete the source branch.') }}
</template>
</li>
<li v-if="mr.relatedLinks" class="gl-line-height-normal">
......
......@@ -57,7 +57,7 @@ RSpec.describe 'User adds a merge request to a merge train', :js do
it 'informs merge request that auto merge is enabled' do
within('.mr-widget-section') do
expect(page).to have_content("Added to the merge train by #{user.name}")
expect(page).to have_content('The source branch will not be deleted')
expect(page).to have_content('Does not delete the source branch')
expect(page).to have_button('Remove from merge train')
expect(page).to have_button('Delete source branch')
end
......@@ -102,7 +102,7 @@ RSpec.describe 'User adds a merge request to a merge train', :js do
it 'updates the merge option' do
within('.mr-widget-section') do
expect(page).to have_content('The source branch will be deleted')
expect(page).to have_content('Deletes the source branch')
end
end
end
......
......@@ -58,7 +58,7 @@ RSpec.describe 'User adds to merge train when pipeline succeeds', :js do
it 'informs merge request that auto merge is enabled' do
within('.mr-widget-section') do
expect(page).to have_content("Set by #{user.name} to start a merge train when the pipeline succeeds")
expect(page).to have_content('The source branch will not be deleted')
expect(page).to have_content('Does not delete the source branch')
expect(page).to have_button('Cancel auto-merge')
expect(page).to have_button('Delete source branch')
end
......@@ -85,7 +85,7 @@ RSpec.describe 'User adds to merge train when pipeline succeeds', :js do
it 'updates the merge option' do
within('.mr-widget-section') do
expect(page).to have_content('The source branch will be deleted')
expect(page).to have_content('Deletes the source branch')
end
end
end
......
......@@ -1097,7 +1097,7 @@ describe('ee merge request widget options', () => {
nextTick(() => {
const tooltip = wrapper.find('[data-testid="question-o-icon"]');
expect(wrapper.text()).toContain('The source branch will be deleted');
expect(wrapper.text()).toContain('Deletes the source branch');
expect(tooltip.attributes('title')).toBe(
'A user with write access to the source branch selected this option',
);
......
......@@ -1107,9 +1107,6 @@ msgstr ""
msgid "(check progress)"
msgstr ""
msgid "(commits will be squashed)"
msgstr ""
msgid "(deleted)"
msgstr ""
......@@ -1128,6 +1125,11 @@ msgstr ""
msgid "(revoked)"
msgstr ""
msgid "(squashes %d commit)"
msgid_plural "(squashes %d commits)"
msgstr[0] ""
msgstr[1] ""
msgid "(this user)"
msgstr ""
......@@ -11176,6 +11178,12 @@ msgstr ""
msgid "Deleted projects cannot be restored!"
msgstr ""
msgid "Deletes the source branch"
msgstr ""
msgid "Deletes the source branch."
msgstr ""
msgid "Deleting"
msgstr ""
......@@ -12226,6 +12234,9 @@ msgstr ""
msgid "Does not apply to projects in personal namespaces, which are deleted immediately on request."
msgstr ""
msgid "Does not delete the source branch."
msgstr ""
msgid "Domain"
msgstr ""
......@@ -32521,12 +32532,6 @@ msgstr ""
msgid "Source branch"
msgstr ""
msgid "Source branch will be deleted."
msgstr ""
msgid "Source branch will not be deleted."
msgstr ""
msgid "Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}"
msgstr ""
......@@ -34522,9 +34527,6 @@ msgstr ""
msgid "The snippet is visible to any logged in user except external users."
msgstr ""
msgid "The source branch will be deleted"
msgstr ""
msgid "The specified tab is invalid, please select another"
msgstr ""
......@@ -41034,13 +41036,13 @@ msgstr ""
msgid "most recent deployment"
msgstr ""
msgid "mrWidgetCommitsAdded|%{commitCount} and %{mergeCommitCount} will be added to %{targetBranch}%{squashedCommits}."
msgid "mrWidgetCommitsAdded|1 merge commit"
msgstr ""
msgid "mrWidgetCommitsAdded|%{commitCount} will be added to %{targetBranch}."
msgid "mrWidgetCommitsAdded|Adds %{commitCount} and %{mergeCommitCount} to %{targetBranch}%{squashedCommits}."
msgstr ""
msgid "mrWidgetCommitsAdded|1 merge commit"
msgid "mrWidgetCommitsAdded|Adds %{commitCount} to %{targetBranch}."
msgstr ""
msgid "mrWidgetNothingToMerge|This merge request contains no changes."
......@@ -41150,6 +41152,9 @@ msgstr ""
msgid "mrWidget|Delete source branch"
msgstr ""
msgid "mrWidget|Deletes the source branch"
msgstr ""
msgid "mrWidget|Deployment statistics are not available currently"
msgstr ""
......@@ -41159,6 +41164,9 @@ msgstr ""
msgid "mrWidget|Dismiss"
msgstr ""
msgid "mrWidget|Does not delete the source branch"
msgstr ""
msgid "mrWidget|Email patches"
msgstr ""
......@@ -41215,6 +41223,9 @@ msgstr ""
msgid "mrWidget|Merged by"
msgstr ""
msgid "mrWidget|Merges changes into"
msgstr ""
msgid "mrWidget|Merging! Changes are being shipped…"
msgstr ""
......@@ -41299,9 +41310,6 @@ msgstr ""
msgid "mrWidget|The changes were not merged into"
msgstr ""
msgid "mrWidget|The changes will be merged into"
msgstr ""
msgid "mrWidget|The pipeline for this merge request did not complete. Push a new commit to fix the failure, or check the %{linkStart}troubleshooting documentation%{linkEnd} to see other possible actions."
msgstr ""
......@@ -41317,12 +41325,6 @@ msgstr ""
msgid "mrWidget|The source branch is being deleted"
msgstr ""
msgid "mrWidget|The source branch will be deleted"
msgstr ""
msgid "mrWidget|The source branch will not be deleted"
msgstr ""
msgid "mrWidget|There are merge conflicts"
msgstr ""
......
......@@ -36,7 +36,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
click_button "Merge when pipeline succeeds"
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds"
expect(page).to have_content "The source branch will not be deleted"
expect(page).to have_content "Does not delete the source branch"
expect(page).to have_selector ".js-cancel-auto-merge"
visit project_merge_request_path(project, merge_request) # Needed to refresh the page
expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i
......@@ -126,7 +126,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
it 'allows to delete source branch' do
click_button "Delete source branch"
expect(page).to have_content "The source branch will be deleted"
expect(page).to have_content "Deletes the source branch"
end
context 'when pipeline succeeds' do
......
......@@ -426,7 +426,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
it 'user cannot remove source branch', :sidekiq_might_not_need_inline do
expect(page).not_to have_field('remove-source-branch-input')
expect(page).to have_content('The source branch will be deleted')
expect(page).to have_content('Deletes the source branch')
end
end
......
......@@ -50,7 +50,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is disabled template should have
<span
class="gl-mr-3"
>
The source branch will not be deleted
Does not delete the source branch
</span>
<gl-button-stub
......@@ -122,7 +122,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is enabled template should have c
<span
class="gl-mr-3"
>
The source branch will not be deleted
Does not delete the source branch
</span>
<gl-button-stub
......
......@@ -270,8 +270,8 @@ describe('MRWidgetAutoMergeEnabled', () => {
const normalizedText = wrapper.text().replace(/\s+/g, ' ');
expect(normalizedText).toContain('The source branch will be deleted');
expect(normalizedText).not.toContain('The source branch will not be deleted');
expect(normalizedText).toContain('Deletes the source branch');
expect(normalizedText).not.toContain('Does not delete the source branch');
});
it('should not show delete source branch button when user not able to delete source branch', () => {
......
......@@ -42,7 +42,7 @@ describe('MRWidgetMerging', () => {
.trim()
.replace(/\s\s+/g, ' ')
.replace(/[\r\n]+/g, ' '),
).toEqual('The changes will be merged into branch');
).toEqual('Merges changes into branch');
expect(wrapper.find('a').attributes('href')).toBe('/branch-path');
});
......
......@@ -543,7 +543,7 @@ describe('MrWidgetOptions', () => {
nextTick(() => {
const tooltip = wrapper.find('[data-testid="question-o-icon"]');
expect(wrapper.text()).toContain('The source branch will be deleted');
expect(wrapper.text()).toContain('Deletes the source branch');
expect(tooltip.attributes('title')).toBe(
'A user with write access to the source branch selected this option',
);
......@@ -559,7 +559,7 @@ describe('MrWidgetOptions', () => {
nextTick(() => {
expect(wrapper.text()).toContain('The source branch has been deleted');
expect(wrapper.text()).not.toContain('The source branch will be deleted');
expect(wrapper.text()).not.toContain('Deletes the source branch');
done();
});
......
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