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>
/* eslint-disable @gitlab/require-i18n-strings */
import { GlModal, GlLink, GlSprintf } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { escapeShellString } from '~/lib/utils/text_utility';
import { __ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
......@@ -10,24 +11,26 @@ export default {
steps: {
step1: {
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: {
label: __('Step 2.'),
help: __('Review the changes locally'),
help: __('Review the changes locally.'),
},
step3: {
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: {
label: __('Step 4.'),
help: __('Push the result of the merge to GitLab'),
help: __('Push the target branch up to GitLab.'),
},
},
copyCommands: __('Copy commands'),
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'),
},
......@@ -74,6 +77,13 @@ export default {
default: null,
},
},
data() {
return {
resolveConflictsFromCli: helpPagePath('ee/user/project/merge_requests/conflicts.html', {
anchor: 'resolve-conflicts-from-the-command-line',
}),
};
},
computed: {
mergeInfo1() {
const escapedOriginBranch = escapeShellString(`origin/${this.sourceBranch}`);
......@@ -138,7 +148,13 @@ export default {
<strong>
{{ $options.i18n.steps.step3.label }}
</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>
<div class="gl-display-flex">
<pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo2 }}</pre>
......@@ -163,7 +179,7 @@ export default {
/>
</div>
<p v-if="reviewingDocsPath">
<gl-sprintf :message="$options.i18n.tip">
<gl-sprintf data-testid="docs-tip" :message="$options.i18n.tip">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
......
......@@ -144,7 +144,7 @@ export default {
:size="glFeatures.restructuredMrWidget ? 'small' : 'medium'"
data-testid="merge-locally-button"
>
{{ s__('mrWidget|Merge locally') }}
{{ s__('mrWidget|Resolve locally') }}
</gl-button>
</template>
</div>
......
......@@ -986,7 +986,7 @@ msgstr ""
msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups."
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 ""
msgid "%{strong_start}%{branch_count}%{strong_end} Branch"
......@@ -15547,7 +15547,7 @@ msgstr ""
msgid "February"
msgstr ""
msgid "Fetch and check out the branch for this merge request"
msgid "Fetch and check out this merge request's feature branch:"
msgstr ""
msgid "Fetching incoming email"
......@@ -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"
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 ""
msgid "Merge unavailable: merge requests are read-only in a secondary Geo node."
......@@ -29963,7 +29963,7 @@ msgstr ""
msgid "Push rules"
msgstr ""
msgid "Push the result of the merge to GitLab"
msgid "Push the target branch up to GitLab."
msgstr ""
msgid "Push to create a project"
......@@ -31492,7 +31492,7 @@ msgstr ""
msgid "Review requests for you"
msgstr ""
msgid "Review the changes locally"
msgid "Review the changes locally."
msgstr ""
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 ""
msgid "mrWidget|Merge failed."
msgstr ""
msgid "mrWidget|Merge locally"
msgstr ""
msgid "mrWidget|Merge unavailable: merge requests are read-only on archived projects."
msgstr ""
......@@ -44152,6 +44149,9 @@ msgstr ""
msgid "mrWidget|Resolve conflicts"
msgstr ""
msgid "mrWidget|Resolve locally"
msgstr ""
msgid "mrWidget|Revert"
msgstr ""
......
......@@ -19,7 +19,7 @@ describe('MRWidgetConflicts', () => {
const userCannotMergeText =
'Users who can write to the source or target branches can resolve the conflicts.';
const resolveConflictsBtnText = 'Resolve conflicts';
const mergeLocallyBtnText = 'Merge locally';
const mergeLocallyBtnText = 'Resolve locally';
async function createComponent(propsData = {}) {
wrapper = extendedWrapper(
......
import { GlModal, GlSprintf } from '@gitlab/ui';
import { GlModal } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import MrWidgetHowToMergeModal from '~/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue';
......@@ -27,7 +27,7 @@ describe('MRWidgetHowToMerge', () => {
const findModal = () => wrapper.find(GlModal);
const findInstructionsFields = () =>
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', () => {
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