Commit b6fa39a0 authored by Amy Qualls's avatar Amy Qualls Committed by Enrique Alcántara

Revise merge-conflict modal text

Start the process of revising the merge-conflict modal's text. It
has grammar and punctuation problems, a bad verb in the button text,
and needs a link out to the documentation.

Changelog: changed
parent 5a140d5c
<script> <script>
/* eslint-disable @gitlab/require-i18n-strings */ /* eslint-disable @gitlab/require-i18n-strings */
import { GlModal, GlLink, GlSprintf } from '@gitlab/ui'; import { GlModal, GlLink, GlSprintf } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { escapeShellString } from '~/lib/utils/text_utility'; import { escapeShellString } from '~/lib/utils/text_utility';
import { __ } from '~/locale'; import { __ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
...@@ -10,24 +11,26 @@ export default { ...@@ -10,24 +11,26 @@ export default {
steps: { steps: {
step1: { step1: {
label: __('Step 1.'), label: __('Step 1.'),
help: __('Fetch and check out the branch for this merge request'), help: __("Fetch and check out this merge request's feature branch:"),
}, },
step2: { step2: {
label: __('Step 2.'), label: __('Step 2.'),
help: __('Review the changes locally'), help: __('Review the changes locally.'),
}, },
step3: { step3: {
label: __('Step 3.'), label: __('Step 3.'),
help: __('Merge the branch and fix any conflicts that come up'), help: __(
'Merge the feature branch into the target branch and fix any conflicts. %{linkStart}How do I fix them?%{linkEnd}',
),
}, },
step4: { step4: {
label: __('Step 4.'), label: __('Step 4.'),
help: __('Push the result of the merge to GitLab'), help: __('Push the target branch up to GitLab.'),
}, },
}, },
copyCommands: __('Copy commands'), copyCommands: __('Copy commands'),
tip: __( tip: __(
'%{strongStart}Tip:%{strongEnd} You can also checkout merge requests locally by %{linkStart}following these guidelines%{linkEnd}', '%{strongStart}Tip:%{strongEnd} You can also check out merge requests locally. %{linkStart}Learn more.%{linkEnd}',
), ),
title: __('Check out, review, and merge locally'), title: __('Check out, review, and merge locally'),
}, },
...@@ -74,6 +77,13 @@ export default { ...@@ -74,6 +77,13 @@ export default {
default: null, default: null,
}, },
}, },
data() {
return {
resolveConflictsFromCli: helpPagePath('ee/user/project/merge_requests/conflicts.html', {
anchor: 'resolve-conflicts-from-the-command-line',
}),
};
},
computed: { computed: {
mergeInfo1() { mergeInfo1() {
const escapedOriginBranch = escapeShellString(`origin/${this.sourceBranch}`); const escapedOriginBranch = escapeShellString(`origin/${this.sourceBranch}`);
...@@ -138,7 +148,13 @@ export default { ...@@ -138,7 +148,13 @@ export default {
<strong> <strong>
{{ $options.i18n.steps.step3.label }} {{ $options.i18n.steps.step3.label }}
</strong> </strong>
{{ $options.i18n.steps.step3.help }} <gl-sprintf :message="$options.i18n.steps.step3.help">
<template #link="{ content }">
<gl-link class="gl-display-inline-block" :href="resolveConflictsFromCli">
{{ content }}
</gl-link>
</template>
</gl-sprintf>
</p> </p>
<div class="gl-display-flex"> <div class="gl-display-flex">
<pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo2 }}</pre> <pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo2 }}</pre>
...@@ -163,7 +179,7 @@ export default { ...@@ -163,7 +179,7 @@ export default {
/> />
</div> </div>
<p v-if="reviewingDocsPath"> <p v-if="reviewingDocsPath">
<gl-sprintf :message="$options.i18n.tip"> <gl-sprintf data-testid="docs-tip" :message="$options.i18n.tip">
<template #strong="{ content }"> <template #strong="{ content }">
<strong>{{ content }}</strong> <strong>{{ content }}</strong>
</template> </template>
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
:size="glFeatures.restructuredMrWidget ? 'small' : 'medium'" :size="glFeatures.restructuredMrWidget ? 'small' : 'medium'"
data-testid="merge-locally-button" data-testid="merge-locally-button"
> >
{{ s__('mrWidget|Merge locally') }} {{ s__('mrWidget|Resolve locally') }}
</gl-button> </gl-button>
</template> </template>
</div> </div>
......
...@@ -986,7 +986,7 @@ msgstr "" ...@@ -986,7 +986,7 @@ msgstr ""
msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups." msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups."
msgstr "" msgstr ""
msgid "%{strongStart}Tip:%{strongEnd} You can also checkout merge requests locally by %{linkStart}following these guidelines%{linkEnd}" msgid "%{strongStart}Tip:%{strongEnd} You can also check out merge requests locally. %{linkStart}Learn more.%{linkEnd}"
msgstr "" msgstr ""
msgid "%{strong_start}%{branch_count}%{strong_end} Branch" msgid "%{strong_start}%{branch_count}%{strong_end} Branch"
...@@ -15547,7 +15547,7 @@ msgstr "" ...@@ -15547,7 +15547,7 @@ msgstr ""
msgid "February" msgid "February"
msgstr "" msgstr ""
msgid "Fetch and check out the branch for this merge request" msgid "Fetch and check out this merge request's feature branch:"
msgstr "" msgstr ""
msgid "Fetching incoming email" msgid "Fetching incoming email"
...@@ -23092,7 +23092,7 @@ msgstr "" ...@@ -23092,7 +23092,7 @@ msgstr ""
msgid "Merge requests are a place to propose changes you've made to a project and discuss those changes with others" msgid "Merge requests are a place to propose changes you've made to a project and discuss those changes with others"
msgstr "" msgstr ""
msgid "Merge the branch and fix any conflicts that come up" msgid "Merge the feature branch into the target branch and fix any conflicts. %{linkStart}How do I fix them?%{linkEnd}"
msgstr "" msgstr ""
msgid "Merge unavailable: merge requests are read-only in a secondary Geo node." msgid "Merge unavailable: merge requests are read-only in a secondary Geo node."
...@@ -29963,7 +29963,7 @@ msgstr "" ...@@ -29963,7 +29963,7 @@ msgstr ""
msgid "Push rules" msgid "Push rules"
msgstr "" msgstr ""
msgid "Push the result of the merge to GitLab" msgid "Push the target branch up to GitLab."
msgstr "" msgstr ""
msgid "Push to create a project" msgid "Push to create a project"
...@@ -31492,7 +31492,7 @@ msgstr "" ...@@ -31492,7 +31492,7 @@ msgstr ""
msgid "Review requests for you" msgid "Review requests for you"
msgstr "" msgstr ""
msgid "Review the changes locally" msgid "Review the changes locally."
msgstr "" msgstr ""
msgid "Review the process for configuring service providers in your identity provider — in this case, GitLab is the \"service provider\" or \"relying party\"." msgid "Review the process for configuring service providers in your identity provider — in this case, GitLab is the \"service provider\" or \"relying party\"."
...@@ -44077,9 +44077,6 @@ msgstr "" ...@@ -44077,9 +44077,6 @@ msgstr ""
msgid "mrWidget|Merge failed." msgid "mrWidget|Merge failed."
msgstr "" msgstr ""
msgid "mrWidget|Merge locally"
msgstr ""
msgid "mrWidget|Merge unavailable: merge requests are read-only on archived projects." msgid "mrWidget|Merge unavailable: merge requests are read-only on archived projects."
msgstr "" msgstr ""
...@@ -44152,6 +44149,9 @@ msgstr "" ...@@ -44152,6 +44149,9 @@ msgstr ""
msgid "mrWidget|Resolve conflicts" msgid "mrWidget|Resolve conflicts"
msgstr "" msgstr ""
msgid "mrWidget|Resolve locally"
msgstr ""
msgid "mrWidget|Revert" msgid "mrWidget|Revert"
msgstr "" msgstr ""
......
...@@ -19,7 +19,7 @@ describe('MRWidgetConflicts', () => { ...@@ -19,7 +19,7 @@ describe('MRWidgetConflicts', () => {
const userCannotMergeText = const userCannotMergeText =
'Users who can write to the source or target branches can resolve the conflicts.'; 'Users who can write to the source or target branches can resolve the conflicts.';
const resolveConflictsBtnText = 'Resolve conflicts'; const resolveConflictsBtnText = 'Resolve conflicts';
const mergeLocallyBtnText = 'Merge locally'; const mergeLocallyBtnText = 'Resolve locally';
async function createComponent(propsData = {}) { async function createComponent(propsData = {}) {
wrapper = extendedWrapper( wrapper = extendedWrapper(
......
import { GlModal, GlSprintf } from '@gitlab/ui'; import { GlModal } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MrWidgetHowToMergeModal from '~/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue'; import MrWidgetHowToMergeModal from '~/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue';
...@@ -27,7 +27,7 @@ describe('MRWidgetHowToMerge', () => { ...@@ -27,7 +27,7 @@ describe('MRWidgetHowToMerge', () => {
const findModal = () => wrapper.find(GlModal); const findModal = () => wrapper.find(GlModal);
const findInstructionsFields = () => const findInstructionsFields = () =>
wrapper.findAll('[ data-testid="how-to-merge-instructions"]'); wrapper.findAll('[ data-testid="how-to-merge-instructions"]');
const findTipLink = () => wrapper.find(GlSprintf); const findTipLink = () => wrapper.find("[data-testid='docs-tip']");
it('renders a modal', () => { it('renders a modal', () => {
expect(findModal().exists()).toBe(true); expect(findModal().exists()).toBe(true);
......
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