Commit 1d4c5266 authored by Amy Qualls's avatar Amy Qualls Committed by Jose Ivan Vargas

Standardize language on branch deletion

parent 532f8b12
<script> <script>
import { GlIcon, GlSprintf, GlTooltipDirective } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '../../locale'; import { __ } from '../../locale';
export default { export default {
i18n: { i18n: {
removesBranchText: __('%{strongStart}Deletes%{strongEnd} source branch'), removesBranchText: __('The source branch will be deleted'),
tooltipTitle: __('A user with write access to the source branch selected this option'), tooltipTitle: __('A user with write access to the source branch selected this option'),
}, },
components: { components: {
GlIcon, GlIcon,
GlSprintf,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -20,11 +19,7 @@ export default { ...@@ -20,11 +19,7 @@ export default {
<template> <template>
<p v-once class="mr-info-list gl-ml-7 gl-pb-5 gl-mb-0"> <p v-once class="mr-info-list gl-ml-7 gl-pb-5 gl-mb-0">
<span class="status-text"> <span class="status-text">
<gl-sprintf :message="$options.i18n.removesBranchText"> {{ $options.i18n.removesBranchText }}
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
</gl-sprintf>
</span> </span>
<gl-icon <gl-icon
v-gl-tooltip.hover v-gl-tooltip.hover
......
...@@ -1104,7 +1104,7 @@ describe('ee merge request widget options', () => { ...@@ -1104,7 +1104,7 @@ describe('ee merge request widget options', () => {
nextTick(() => { nextTick(() => {
const tooltip = wrapper.find('[data-testid="question-o-icon"]'); const tooltip = wrapper.find('[data-testid="question-o-icon"]');
expect(wrapper.text()).toContain('Deletes source branch'); expect(wrapper.text()).toContain('The source branch will be deleted');
expect(tooltip.attributes('title')).toBe( expect(tooltip.attributes('title')).toBe(
'A user with write access to the source branch selected this option', 'A user with write access to the source branch selected this option',
); );
......
...@@ -854,9 +854,6 @@ msgstr "" ...@@ -854,9 +854,6 @@ msgstr ""
msgid "%{state} epics" msgid "%{state} epics"
msgstr "" msgstr ""
msgid "%{strongStart}Deletes%{strongEnd} source branch"
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 checkout merge requests locally by %{linkStart}following these guidelines%{linkEnd}"
msgstr "" msgstr ""
...@@ -32781,6 +32778,9 @@ msgstr "" ...@@ -32781,6 +32778,9 @@ msgstr ""
msgid "The snippet is visible to any logged in user except external users." msgid "The snippet is visible to any logged in user except external users."
msgstr "" msgstr ""
msgid "The source branch will be deleted"
msgstr ""
msgid "The specified tab is invalid, please select another" msgid "The specified tab is invalid, please select another"
msgstr "" msgstr ""
......
...@@ -432,7 +432,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do ...@@ -432,7 +432,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
it 'user cannot remove source branch', :sidekiq_might_not_need_inline 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).not_to have_field('remove-source-branch-input')
expect(page).to have_content('Deletes source branch') expect(page).to have_content('The source branch will be deleted')
end end
end end
......
...@@ -532,7 +532,7 @@ describe('MrWidgetOptions', () => { ...@@ -532,7 +532,7 @@ describe('MrWidgetOptions', () => {
nextTick(() => { nextTick(() => {
const tooltip = wrapper.find('[data-testid="question-o-icon"]'); const tooltip = wrapper.find('[data-testid="question-o-icon"]');
expect(wrapper.text()).toContain('Deletes source branch'); expect(wrapper.text()).toContain('The source branch will be deleted');
expect(tooltip.attributes('title')).toBe( expect(tooltip.attributes('title')).toBe(
'A user with write access to the source branch selected this option', 'A user with write access to the source branch selected this option',
); );
...@@ -548,7 +548,7 @@ describe('MrWidgetOptions', () => { ...@@ -548,7 +548,7 @@ describe('MrWidgetOptions', () => {
nextTick(() => { nextTick(() => {
expect(wrapper.text()).toContain('The source branch has been deleted'); expect(wrapper.text()).toContain('The source branch has been deleted');
expect(wrapper.text()).not.toContain('Deletes source branch'); expect(wrapper.text()).not.toContain('The source branch will be deleted');
done(); 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