Commit d2b1a6b9 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'copy-for-mr-with-no-pipeline-experiment-second-nudge' into 'master'

Copy updates for suggest_gitlab_ci_yml Popover

See merge request gitlab-org/gitlab!34531
parents b5a642ab f9dc904e
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { GlPopover, GlSprintf, GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlPopover, GlSprintf, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { parseBoolean, scrollToElement, setCookie, getCookie } from '~/lib/utils/common_utils'; import { parseBoolean, scrollToElement, setCookie, getCookie } from '~/lib/utils/common_utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { glEmojiTag } from '~/emoji';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
const trackingMixin = Tracking.mixin(); const trackingMixin = Tracking.mixin();
...@@ -11,9 +10,11 @@ const popoverStates = { ...@@ -11,9 +10,11 @@ const popoverStates = {
suggest_gitlab_ci_yml: { suggest_gitlab_ci_yml: {
title: s__(`suggestPipeline|1/2: Choose a template`), title: s__(`suggestPipeline|1/2: Choose a template`),
content: s__( content: s__(
`suggestPipeline|We recommend the %{boldStart}Code Quality%{boldEnd} template, which will add a report widget to your Merge Requests. This way you’ll learn about code quality degradations much sooner. %{footerStart} Goodbye technical debt! %{footerEnd}`, `suggestPipeline|We’re adding a GitLab CI configuration file to add a pipeline to the project. You could create it manually, but we recommend that you start with a GitLab template that works out of the box.`,
),
footer: s__(
`suggestPipeline|Choose %{boldStart}Code Quality%{boldEnd} to add a pipeline that tests the quality of your code.`,
), ),
emoji: glEmojiTag('wave'),
}, },
suggest_commit_first_project_gitlab_ci_yml: { suggest_commit_first_project_gitlab_ci_yml: {
title: s__(`suggestPipeline|2/2: Commit your changes`), title: s__(`suggestPipeline|2/2: Commit your changes`),
...@@ -66,6 +67,9 @@ export default { ...@@ -66,6 +67,9 @@ export default {
suggestContent() { suggestContent() {
return popoverStates[this.trackLabel].content || ''; return popoverStates[this.trackLabel].content || '';
}, },
suggestFooter() {
return popoverStates[this.trackLabel].footer || '';
},
emoji() { emoji() {
return popoverStates[this.trackLabel].emoji || ''; return popoverStates[this.trackLabel].emoji || '';
}, },
...@@ -123,16 +127,13 @@ export default { ...@@ -123,16 +127,13 @@ export default {
</span> </span>
</template> </template>
<gl-sprintf :message="suggestContent"> <gl-sprintf :message="suggestContent" />
<template #bold="{content}">
<strong> {{ content }} </strong>
</template>
<template #footer="{content}">
<div class="mt-3"> <div class="mt-3">
{{ content }} <gl-sprintf :message="suggestFooter">
<span v-html="emoji"></span> <template #bold="{ content }">
</div> <strong> {{ content }} </strong>
</template> </template>
</gl-sprintf> </gl-sprintf>
</div>
</gl-popover> </gl-popover>
</template> </template>
...@@ -27672,10 +27672,13 @@ msgstr "" ...@@ -27672,10 +27672,13 @@ msgstr ""
msgid "suggestPipeline|2/2: Commit your changes" msgid "suggestPipeline|2/2: Commit your changes"
msgstr "" msgstr ""
msgid "suggestPipeline|Choose %{boldStart}Code Quality%{boldEnd} to add a pipeline that tests the quality of your code."
msgstr ""
msgid "suggestPipeline|The template is ready! You can now commit it to create your first pipeline." msgid "suggestPipeline|The template is ready! You can now commit it to create your first pipeline."
msgstr "" msgstr ""
msgid "suggestPipeline|We recommend the %{boldStart}Code Quality%{boldEnd} template, which will add a report widget to your Merge Requests. This way you’ll learn about code quality degradations much sooner. %{footerStart} Goodbye technical debt! %{footerEnd}" msgid "suggestPipeline|We’re adding a GitLab CI configuration file to add a pipeline to the project. You could create it manually, but we recommend that you start with a GitLab template that works out of the box."
msgstr "" msgstr ""
msgid "syntax is correct" msgid "syntax is correct"
......
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