Commit 99ed8fec authored by Nathan Friend's avatar Nathan Friend

Merge branch 'jh-remove_html_frontend_strings' into 'master'

Remove direct HTML usage from the frontend strings

See merge request gitlab-org/gitlab!38196
parents 37135ccb e40d8efa
......@@ -6,6 +6,7 @@ import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import Badge from './badge.vue';
import BadgeForm from './badge_form.vue';
import BadgeList from './badge_list.vue';
import { GlSprintf } from '@gitlab/ui';
export default {
name: 'BadgeSettings',
......@@ -14,14 +15,15 @@ export default {
BadgeForm,
BadgeList,
GlModal: DeprecatedModal2,
GlSprintf,
},
i18n: {
deleteModalText: s__(
'Badges|You are going to delete this badge. Deleted badges %{strongStart}cannot%{strongEnd} be restored.',
),
},
computed: {
...mapState(['badgeInModal', 'isEditing']),
deleteModalText() {
return s__(
'Badges|You are going to delete this badge. Deleted badges <strong>cannot</strong> be restored.',
);
},
},
methods: {
...mapActions(['deleteBadge']),
......@@ -54,7 +56,13 @@ export default {
:link-url="badgeInModal ? badgeInModal.renderedLinkUrl : ''"
/>
</div>
<p v-html="deleteModalText"></p>
<p>
<gl-sprintf :message="$options.i18n.deleteModalText">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
</gl-sprintf>
</p>
</gl-modal>
<badge-form v-show="isEditing" :is-editing="true" />
......
<script>
import { escape } from 'lodash';
import { GlModal, GlButton, GlDeprecatedButton, GlFormInput } from '@gitlab/ui';
import { GlModal, GlButton, GlDeprecatedButton, GlFormInput, GlSprintf } from '@gitlab/ui';
import SplitButton from '~/vue_shared/components/split_button.vue';
import { s__, sprintf } from '~/locale';
import csrf from '~/lib/utils/csrf';
......@@ -30,6 +30,7 @@ export default {
GlButton,
GlDeprecatedButton,
GlFormInput,
GlSprintf,
},
props: {
clusterPath: {
......@@ -67,18 +68,6 @@ export default {
)
: s__('ClusterIntegration|You are about to remove your cluster integration.');
},
warningToBeRemoved() {
return s__(`ClusterIntegration|
This will permanently delete the following resources:
<ul>
<li>All installed applications and related resources</li>
<li>The <code>gitlab-managed-apps</code> namespace</li>
<li>Any project namespaces</li>
<li><code>clusterroles</code></li>
<li><code>clusterrolebindings</code></li>
</ul>
`);
},
confirmationTextLabel() {
return sprintf(
this.confirmCleanup
......@@ -144,7 +133,27 @@ export default {
>
<template>
<p>{{ warningMessage }}</p>
<div v-if="confirmCleanup" v-html="warningToBeRemoved"></div>
<div v-if="confirmCleanup">
{{ s__('ClusterIntegration|This will permanently delete the following resources:') }}
<ul>
<li>
{{ s__('ClusterIntegration|All installed applications and related resources') }}
</li>
<li>
<gl-sprintf :message="s__('ClusterIntegration|The %{gitlabNamespace} namespace')">
<template #gitlabNamespace>
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
<code>{{ 'gitlab-managed-apps' }}</code>
</template>
</gl-sprintf>
</li>
<li>{{ s__('ClusterIntegration|Any project namespaces') }}</li>
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<li><code>clusterroles</code></li>
<li><code>clusterrolebindings</code></li>
<!-- eslint-enable @gitlab/vue-require-i18n-strings -->
</ul>
</div>
<strong v-html="confirmationTextLabel"></strong>
<form ref="form" :action="clusterPath" method="post" class="gl-mb-5">
<input ref="method" type="hidden" name="_method" value="delete" />
......
<script>
import { escape } from 'lodash';
import { mapState, mapGetters, mapActions } from 'vuex';
import { s__, sprintf } from '~/locale';
import { s__ } from '~/locale';
import { GlSprintf, GlLink } from '@gitlab/ui';
import gkeDropdownMixin from './gke_dropdown_mixin';
export default {
name: 'GkeProjectIdDropdown',
components: {
GlSprintf,
GlLink,
},
mixins: [gkeDropdownMixin],
props: {
docsUrl: {
......@@ -46,31 +50,23 @@ export default {
return s__('ClusterIntegration|Select project');
},
helpText() {
let message;
if (this.hasErrors) {
return this.errorMessage;
}
if (!this.items) {
message =
'ClusterIntegration|We were unable to fetch any projects. Ensure that you have a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.';
return s__(
'ClusterIntegration|We were unable to fetch any projects. Ensure that you have a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.',
);
}
message =
this.items && this.items.length
? 'ClusterIntegration|To use a new project, first create one on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.'
: 'ClusterIntegration|To create a cluster, first create a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.';
return sprintf(
s__(message),
{
docsLinkEnd: '&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>',
docsLinkStart: `<a href="${escape(
this.docsUrl,
)}" target="_blank" rel="noopener noreferrer">`,
},
false,
);
return this.items.length
? s__(
'ClusterIntegration|To use a new project, first create one on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.',
)
: s__(
'ClusterIntegration|To create a cluster, first create a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}.',
);
},
errorMessage() {
if (!this.projectHasBillingEnabled) {
......@@ -80,21 +76,13 @@ export default {
);
}
return sprintf(
s__(
'This project does not have billing enabled. To create a cluster, <a href=%{linkToBilling} target="_blank" rel="noopener noreferrer">enable billing <i class="fa fa-external-link" aria-hidden="true"></i></a> and try again.',
),
{
linkToBilling:
'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral',
},
false,
return s__(
'ClusterIntegration|This project does not have billing enabled. To create a cluster, %{linkToBillingStart}enable billing%{linkToBillingEnd} and try again.',
);
}
return sprintf(
s__('ClusterIntegration|An error occurred while trying to fetch your projects: %{error}'),
{ error: this.gapiError },
return s__(
'ClusterIntegration|An error occurred while trying to fetch your projects: %{error}',
);
},
},
......@@ -182,7 +170,28 @@ export default {
'text-muted': !hasErrors,
}"
class="form-text"
v-html="helpText"
></span>
>
<gl-sprintf :message="helpText">
<template #linkToBilling="{ content }">
<gl-link
:href="
'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral'
"
target="_blank"
>{{ content }} <i class="fa fa-external-link" aria-hidden="true"></i
></gl-link>
</template>
<template #docsLink="{ content }">
<gl-link :href="docsUrl" target="_blank"
>{{ content }} <i class="fa fa-external-link" aria-hidden="true"></i
></gl-link>
</template>
<template #error>
{{ gapiError }}
</template>
</gl-sprintf>
</span>
</div>
</template>
......@@ -21,7 +21,7 @@ export const EMPTY_RUNNERS = __(
'Configure GitLab runners to start using the Web Terminal. %{helpStart}Learn more.%{helpEnd}',
);
export const ERROR_CONFIG = __(
'Configure a <code>.gitlab-webide.yml</code> file in the <code>.gitlab</code> directory to start using the Web Terminal. %{helpStart}Learn more.%{helpEnd}',
'Configure a %{codeStart}.gitlab-webide.yml%{codeEnd} file in the %{codeStart}.gitlab%{codeEnd} directory to start using the Web Terminal. %{helpStart}Learn more.%{helpEnd}',
);
export const ERROR_PERMISSION = __(
'You do not have permission to run the Web Terminal. Please contact a project administrator.',
......@@ -34,6 +34,8 @@ export const configCheckError = (status, helpUrl) => {
{
helpStart: `<a href="${escape(helpUrl)}" target="_blank">`,
helpEnd: '</a>',
codeStart: '<code>',
codeEnd: '</code>',
},
false,
);
......
import $ from 'jquery';
import { parseBoolean, getCookie, setCookie, removeCookie } from '~/lib/utils/common_utils';
import { __ } from '~/locale';
import { __, sprintf } from '~/locale';
import Tracking from '~/tracking';
const COOKIE_NAME = 'onboarding_issues_settings';
......@@ -94,8 +94,12 @@ export const showLearnGitLabProjectPopover = () => {
if (!el) return;
const options = {
content: __(
'Go to <strong>Issues</strong> > <strong>Boards</strong> to access your personalized learning issue board.',
content: sprintf(
__(
'Go to %{strongStart}Issues%{strongEnd} &gt; %{strongStart}Boards%{strongEnd} to access your personalized learning issue board.',
),
{ strongStart: '<strong>', strongEnd: '</strong>' },
false,
),
};
......@@ -111,8 +115,12 @@ export const showLearnGitLabIssuesPopover = () => {
if (!el) return;
const options = {
content: __(
'Go to <strong>Issues</strong> > <strong>Boards</strong> to access your personalized learning issue board.',
content: sprintf(
__(
'Go to %{strongStart}Issues%{strongEnd} &gt; %{strongStart}Boards%{strongEnd} to access your personalized learning issue board.',
),
{ strongStart: '<strong>', strongEnd: '</strong>' },
false,
),
};
......
<script>
import { escape } from 'lodash';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import { s__, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import eventHub from '../event_hub';
import { GlSprintf } from '@gitlab/ui';
export default {
components: {
GlModal: DeprecatedModal2,
GlSprintf,
},
props: {
url: {
......@@ -45,20 +46,6 @@ export default {
},
);
},
title() {
const label = `<span
class="label color-label"
style="background-color: ${this.labelColor}; color: ${this.labelTextColor};"
>${escape(this.labelTitle)}</span>`;
return sprintf(
s__('Labels|<span>Promote label</span> %{labelTitle} <span>to Group Label?</span>'),
{
labelTitle: label,
},
false,
);
},
},
methods: {
onSubmit() {
......@@ -90,7 +77,27 @@ export default {
footer-primary-button-variant="warning"
@submit="onSubmit"
>
<div slot="title" class="modal-title-with-label" v-html="title"></div>
<div slot="title" class="modal-title-with-label">
<gl-sprintf
:message="
s__(
'Labels|%{spanStart}Promote label%{spanEnd} %{labelTitle} %{spanStart}to Group Label?%{spanEnd}',
)
"
>
<template #labelTitle>
<span
class="label color-label"
:style="`background-color: ${labelColor}; color: ${labelTextColor};`"
>
{{ labelTitle }}
</span>
</template>
<template #span="{ content }"
><span>{{ content }}</span></template
>
</gl-sprintf>
</div>
{{ text }}
</gl-modal>
......
......@@ -87,16 +87,15 @@ export default class PrometheusMetrics {
if (totalMonitoredMetrics === 0) {
const emptyCommonMetricsText = sprintf(
s__(
'PrometheusService|<p class="text-tertiary">No <a href="%{docsUrl}">common metrics</a> were found</p>',
),
s__('PrometheusService|No %{docsUrlStart}common metrics%{docsUrlEnd} were found'),
{
docsUrl: this.helpMetricsPath,
docsUrlStart: `<a href="${this.helpMetricsPath}">`,
docsUrlEnd: '</a>',
},
false,
);
this.$monitoredMetricsEmpty.empty();
this.$monitoredMetricsEmpty.append(emptyCommonMetricsText);
this.$monitoredMetricsEmpty.append(`<p class="text-tertiary">${emptyCommonMetricsText}</p>`);
this.showMonitoringMetricsPanelState(PANEL_STATE.EMPTY);
} else {
const metricsCountText = sprintf(
......
<script>
import editFormButtons from './edit_form_buttons.vue';
import { __, sprintf } from '../../../locale';
import { __ } from '../../../locale';
import { GlSprintf } from '@gitlab/ui';
export default {
components: {
editFormButtons,
GlSprintf,
},
props: {
confidential: {
......@@ -22,25 +24,13 @@ export default {
},
computed: {
confidentialityOnWarning() {
const accessLevel = __('at least Reporter access');
return sprintf(
__(
'You are going to turn on the confidentiality. This means that only team members with %{accessLevel} are able to see and leave comments on the %{issuableType}.',
),
{ issuableType: this.issuableType, accessLevel: `<strong>${accessLevel}</strong>` },
false,
return __(
'You are going to turn on the confidentiality. This means that only team members with %{strongStart}at least Reporter access%{strongEnd} are able to see and leave comments on the %{issuableType}.',
);
},
confidentialityOffWarning() {
const accessLevel = __('everyone');
return sprintf(
__(
'You are going to turn off the confidentiality. This means %{accessLevel} will be able to see and leave a comment on this %{issuableType}.',
),
{ issuableType: this.issuableType, accessLevel: `<strong>${accessLevel}</strong>` },
false,
return __(
'You are going to turn off the confidentiality. This means %{strongStart}everyone%{strongEnd} will be able to see and leave a comment on this %{issuableType}.',
);
},
},
......@@ -51,8 +41,22 @@ export default {
<div class="dropdown show">
<div class="dropdown-menu sidebar-item-warning-message">
<div>
<p v-if="!confidential" v-html="confidentialityOnWarning"></p>
<p v-else v-html="confidentialityOffWarning"></p>
<p v-if="!confidential">
<gl-sprintf :message="confidentialityOnWarning">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
<template #issuableType>{{ issuableType }}</template>
</gl-sprintf>
</p>
<p v-else>
<gl-sprintf :message="confidentialityOffWarning">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
<template #issuableType>{{ issuableType }}</template>
</gl-sprintf>
</p>
<edit-form-buttons :full-path="fullPath" :confidential="confidential" />
</div>
</div>
......
<script>
import editFormButtons from './edit_form_buttons.vue';
import { __, sprintf } from '../../../locale';
import { GlSprintf } from '@gitlab/ui';
export default {
components: {
editFormButtons,
GlSprintf,
},
props: {
isLocked: {
......@@ -16,33 +17,41 @@ export default {
type: String,
},
},
computed: {
lockWarning() {
return sprintf(
__(
'Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment.',
),
{ issuableDisplayName: this.issuableDisplayName },
);
},
unlockWarning() {
return sprintf(
__(
'Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment.',
),
{ issuableDisplayName: this.issuableDisplayName },
);
},
},
};
</script>
<template>
<div class="dropdown show">
<div class="dropdown-menu sidebar-item-warning-message" data-testid="warning-text">
<p v-if="isLocked" class="text" v-html="unlockWarning"></p>
<p v-if="isLocked" class="text">
<gl-sprintf
:message="
__(
'Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment.',
)
"
>
<template #issuableDisplayName>{{ issuableDisplayName }}</template>
<template #strong="{ content }"
><strong>{{ content }}</strong></template
>
</gl-sprintf>
</p>
<p v-else class="text" v-html="lockWarning"></p>
<p v-else class="text">
<gl-sprintf
:message="
__(
'Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment.',
)
"
>
<template #issuableDisplayName>{{ issuableDisplayName }}</template>
<template #strong="{ content }"
><strong>{{ content }}</strong></template
>
</gl-sprintf>
</p>
<edit-form-buttons :is-locked="isLocked" :issuable-display-name="issuableDisplayName" />
</div>
......
<script>
import tooltip from '../../vue_shared/directives/tooltip';
import { __ } from '../../locale';
import { GlSprintf } from '@gitlab/ui';
export default {
i18n: {
removesBranchText: __('%{strongStart}Deletes%{strongEnd} source branch'),
tooltipTitle: __('A user with write access to the source branch selected this option'),
},
components: {
GlSprintf,
},
directives: {
tooltip,
},
created() {
this.removesBranchText = __('<strong>Deletes</strong> source branch');
this.tooltipTitle = __('A user with write access to the source branch selected this option');
},
};
</script>
<template>
<p v-once class="mr-info-list mr-links gl-mb-0">
<span class="status-text" v-html="removesBranchText"> </span>
<i v-tooltip :title="tooltipTitle" :aria-label="tooltipTitle" class="fa fa-question-circle">
<span class="status-text">
<gl-sprintf :message="$options.i18n.removesBranchText">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
</gl-sprintf>
</span>
<i
v-tooltip
:title="$options.i18n.tooltipTitle"
:aria-label="$options.i18n.tooltipTitle"
class="fa fa-question-circle"
>
</i>
</p>
</template>
......@@ -2,11 +2,12 @@
import { componentNames } from 'ee/reports/components/issue_body';
import ReportSection from '~/reports/components/report_section.vue';
import { status as reportStatus } from '~/reports/constants';
import { n__ } from '~/locale';
import { n__, sprintf } from '~/locale';
import { GlSprintf } from '@gitlab/ui';
export default {
name: 'BlockingMergeRequestsReport',
components: { ReportSection },
components: { ReportSection, GlSprintf },
props: {
mr: {
type: Object,
......@@ -64,10 +65,13 @@ export default {
},
blockedByText() {
if (this.closedCount > 0 && this.closedCount === this.unmergedCount) {
return n__(
'Depends on <strong>%d closed</strong> merge request.',
'Depends on <strong>%d closed</strong> merge requests.',
this.closedCount,
return sprintf(
n__(
'Depends on %{strongStart}%{closedCount} closed%{strongEnd} merge request.',
'Depends on %{strongStart}%{closedCount} closed%{strongEnd} merge requests.',
this.closedCount,
),
{ closedCount: this.closedCount },
);
}
......@@ -114,7 +118,13 @@ export default {
</span>
</template>
<template #error>
<span v-html="blockedByText"></span>
<span>
<gl-sprintf :message="blockedByText">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>
</gl-sprintf>
</span>
</template>
</report-section>
</template>
......@@ -103,7 +103,7 @@ describe('BlockingMergeRequestsReport', () => {
createComponent();
expect(wrapper.vm.blockedByText).toEqual(
'Depends on <strong>1 closed</strong> merge request.',
'Depends on %{strongStart}1 closed%{strongEnd} merge request.',
);
});
});
......
This diff is collapsed.
......@@ -697,6 +697,9 @@ msgstr ""
msgid "%{state} epics"
msgstr ""
msgid "%{strongStart}Deletes%{strongEnd} source branch"
msgstr ""
msgid "%{strongStart}Note:%{strongEnd} Once a custom stage has been added you can re-order stages by dragging them into the desired position."
msgstr ""
......@@ -1075,9 +1078,6 @@ msgstr ""
msgid "< 1 hour"
msgstr ""
msgid "<strong>Deletes</strong> source branch"
msgstr ""
msgid "A 'Runner' is a process which runs a job. You can set up as many Runners as you need."
msgstr ""
......@@ -3761,7 +3761,7 @@ msgstr ""
msgid "Badges|This project has no badges"
msgstr ""
msgid "Badges|You are going to delete this badge. Deleted badges <strong>cannot</strong> be restored."
msgid "Badges|You are going to delete this badge. Deleted badges %{strongStart}cannot%{strongEnd} be restored."
msgstr ""
msgid "Badges|Your badges"
......@@ -5117,9 +5117,6 @@ msgstr ""
msgid "ClusterAgent|You have insufficient permissions to create a cluster agent for this project"
msgstr ""
msgid "ClusterIntegration| This will permanently delete the following resources: <ul> <li>All installed applications and related resources</li> <li>The <code>gitlab-managed-apps</code> namespace</li> <li>Any project namespaces</li> <li><code>clusterroles</code></li> <li><code>clusterrolebindings</code></li> </ul>"
msgstr ""
msgid "ClusterIntegration|%{appList} was successfully installed on your Kubernetes cluster"
msgstr ""
......@@ -5174,6 +5171,9 @@ msgstr ""
msgid "ClusterIntegration|All data will be deleted and cannot be restored."
msgstr ""
msgid "ClusterIntegration|All installed applications and related resources"
msgstr ""
msgid "ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster."
msgstr ""
......@@ -5198,6 +5198,9 @@ msgstr ""
msgid "ClusterIntegration|An error occurred while trying to fetch zone machine types: %{error}"
msgstr ""
msgid "ClusterIntegration|Any project namespaces"
msgstr ""
msgid "ClusterIntegration|Any running pipelines will be canceled."
msgstr ""
......@@ -5870,6 +5873,9 @@ msgstr ""
msgid "ClusterIntegration|Subnets"
msgstr ""
msgid "ClusterIntegration|The %{gitlabNamespace} namespace"
msgstr ""
msgid "ClusterIntegration|The Amazon Resource Name (ARN) associated with your role. If you do not have a provision role, first create one on %{startAwsLink}Amazon Web Services %{externalLinkIcon}%{endLink} using the above account and external IDs. %{startMoreInfoLink}More information%{endLink}"
msgstr ""
......@@ -5909,15 +5915,27 @@ msgstr ""
msgid "ClusterIntegration|This option will allow you to install applications on RBAC clusters."
msgstr ""
msgid "ClusterIntegration|This project does not have billing enabled. To create a cluster, %{linkToBillingStart}enable billing%{linkToBillingEnd} and try again."
msgstr ""
msgid "ClusterIntegration|This will permanently delete the following resources:"
msgstr ""
msgid "ClusterIntegration|To access your application after deployment, point a wildcard DNS to the Knative Endpoint."
msgstr ""
msgid "ClusterIntegration|To create a cluster, first create a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
msgstr ""
msgid "ClusterIntegration|To remove your integration and resources, type %{clusterName} to confirm:"
msgstr ""
msgid "ClusterIntegration|To remove your integration, type %{clusterName} to confirm:"
msgstr ""
msgid "ClusterIntegration|To use a new project, first create one on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
msgstr ""
msgid "ClusterIntegration|Uninstall %{appTitle}"
msgstr ""
......@@ -5942,6 +5960,9 @@ msgstr ""
msgid "ClusterIntegration|We could not verify that one of your projects on GCP has billing enabled. Please try again."
msgstr ""
msgid "ClusterIntegration|We were unable to fetch any projects. Ensure that you have a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
msgstr ""
msgid "ClusterIntegration|With a Kubernetes cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way."
msgstr ""
......@@ -6373,7 +6394,7 @@ msgstr ""
msgid "Configure Tracing"
msgstr ""
msgid "Configure a <code>.gitlab-webide.yml</code> file in the <code>.gitlab</code> directory to start using the Web Terminal. %{helpStart}Learn more.%{helpEnd}"
msgid "Configure a %{codeStart}.gitlab-webide.yml%{codeEnd} file in the %{codeStart}.gitlab%{codeEnd} directory to start using the Web Terminal. %{helpStart}Learn more.%{helpEnd}"
msgstr ""
msgid "Configure automatic git checks and housekeeping on repositories."
......@@ -8078,8 +8099,8 @@ msgid_plural "Depends on %d merge requests being merged"
msgstr[0] ""
msgstr[1] ""
msgid "Depends on <strong>%d closed</strong> merge request."
msgid_plural "Depends on <strong>%d closed</strong> merge requests."
msgid "Depends on %{strongStart}%{closedCount} closed%{strongEnd} merge request."
msgid_plural "Depends on %{strongStart}%{closedCount} closed%{strongEnd} merge requests."
msgstr[0] ""
msgstr[1] ""
......@@ -11653,7 +11674,7 @@ msgstr ""
msgid "Go to %{link_to_google_takeout}."
msgstr ""
msgid "Go to <strong>Issues</strong> > <strong>Boards</strong> to access your personalized learning issue board."
msgid "Go to %{strongStart}Issues%{strongEnd} &gt; %{strongStart}Boards%{strongEnd} to access your personalized learning issue board."
msgstr ""
msgid "Go to Webhooks"
......@@ -13957,7 +13978,7 @@ msgstr ""
msgid "Labels can be applied to issues and merge requests."
msgstr ""
msgid "Labels|<span>Promote label</span> %{labelTitle} <span>to Group Label?</span>"
msgid "Labels|%{spanStart}Promote label%{spanEnd} %{labelTitle} %{spanStart}to Group Label?%{spanEnd}"
msgstr ""
msgid "Labels|Promote Label"
......@@ -14525,7 +14546,7 @@ msgstr ""
msgid "Lock the discussion"
msgstr ""
msgid "Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment."
msgid "Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
msgstr ""
msgid "Lock to current projects"
......@@ -19543,9 +19564,6 @@ msgstr ""
msgid "PrometheusService|%{exporters} with %{metrics} were found"
msgstr ""
msgid "PrometheusService|<p class=\"text-tertiary\">No <a href=\"%{docsUrl}\">common metrics</a> were found</p>"
msgstr ""
msgid "PrometheusService|Active"
msgstr ""
......@@ -19603,6 +19621,9 @@ msgstr ""
msgid "PrometheusService|New metric"
msgstr ""
msgid "PrometheusService|No %{docsUrlStart}common metrics%{docsUrlEnd} were found"
msgstr ""
msgid "PrometheusService|No custom metrics have been created. Create one using the button above"
msgstr ""
......@@ -25202,9 +25223,6 @@ msgstr ""
msgid "This project does not have a wiki homepage yet"
msgstr ""
msgid "This project does not have billing enabled. To create a cluster, <a href=%{linkToBilling} target=\"_blank\" rel=\"noopener noreferrer\">enable billing <i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a> and try again."
msgstr ""
msgid "This project has no active access tokens."
msgstr ""
......@@ -26238,7 +26256,7 @@ msgstr ""
msgid "Unlock the discussion"
msgstr ""
msgid "Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment."
msgid "Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
msgstr ""
msgid "Unlocked"
......@@ -27858,10 +27876,10 @@ msgstr ""
msgid "You are going to transfer %{project_full_name} to another owner. Are you ABSOLUTELY sure?"
msgstr ""
msgid "You are going to turn off the confidentiality. This means %{accessLevel} will be able to see and leave a comment on this %{issuableType}."
msgid "You are going to turn off the confidentiality. This means %{strongStart}everyone%{strongEnd} will be able to see and leave a comment on this %{issuableType}."
msgstr ""
msgid "You are going to turn on the confidentiality. This means that only team members with %{accessLevel} are able to see and leave comments on the %{issuableType}."
msgid "You are going to turn on the confidentiality. This means that only team members with %{strongStart}at least Reporter access%{strongEnd} are able to see and leave comments on the %{issuableType}."
msgstr ""
msgid "You are not allowed to push into this branch. Create another branch or open a merge request."
......@@ -28589,9 +28607,6 @@ msgstr ""
msgid "assign yourself"
msgstr ""
msgid "at least Reporter access"
msgstr ""
msgid "at risk"
msgstr ""
......@@ -28982,9 +28997,6 @@ msgstr ""
msgid "estimateCommand|%{slash_command} will update the estimated time with the latest command."
msgstr ""
msgid "everyone"
msgstr ""
msgid "exceeds the limit of %{bytes} bytes"
msgstr ""
......
......@@ -15,6 +15,8 @@ describe('IDE store terminal messages', () => {
sprintf(
messages.ERROR_CONFIG,
{
codeStart: `<code>`,
codeEnd: `</code>`,
helpStart: `<a href="${escape(TEST_HELP_URL)}" target="_blank">`,
helpEnd: '</a>',
},
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Edit Form Dropdown when confidential renders on or off text based on confidentiality 1`] = `
<div
class="dropdown show"
toggleform="function () {}"
updateconfidentialattribute="function () {}"
>
<div
class="dropdown-menu sidebar-item-warning-message"
>
<div>
<p>
<gl-sprintf-stub
message="You are going to turn off the confidentiality. This means %{strongStart}everyone%{strongEnd} will be able to see and leave a comment on this %{issuableType}."
/>
</p>
<edit-form-buttons-stub
confidential="true"
fullpath=""
/>
</div>
</div>
</div>
`;
exports[`Edit Form Dropdown when not confidential renders "You are going to turn on the confidentiality." in the 1`] = `
<div
class="dropdown show"
toggleform="function () {}"
updateconfidentialattribute="function () {}"
>
<div
class="dropdown-menu sidebar-item-warning-message"
>
<div>
<p>
<gl-sprintf-stub
message="You are going to turn on the confidentiality. This means that only team members with %{strongStart}at least Reporter access%{strongEnd} are able to see and leave comments on the %{issuableType}."
/>
</p>
<edit-form-buttons-stub
fullpath=""
/>
</div>
</div>
</div>
`;
......@@ -23,14 +23,14 @@ describe('Edit Form Dropdown', () => {
});
describe('when not confidential', () => {
it('renders "You are going to turn off the confidentiality." in the ', () => {
it('renders "You are going to turn on the confidentiality." in the ', () => {
createComponent({
confidential: false,
toggleForm,
updateConfidentialAttribute,
});
expect(wrapper.find('p').text()).toContain('You are going to turn on the confidentiality.');
expect(wrapper.element).toMatchSnapshot();
});
});
......@@ -42,7 +42,7 @@ describe('Edit Form Dropdown', () => {
updateConfidentialAttribute,
});
expect(wrapper.find('p').text()).toContain('You are going to turn off the confidentiality.');
expect(wrapper.element).toMatchSnapshot();
});
});
});
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Edit Form Dropdown In issue page when locked the appropriate warning text is rendered 1`] = `
<div
class="dropdown-menu sidebar-item-warning-message"
data-testid="warning-text"
>
<p
class="text"
>
<gl-sprintf-stub
message="Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
islocked="true"
issuabledisplayname="issue"
/>
</div>
`;
exports[`Edit Form Dropdown In issue page when unlocked the appropriate warning text is rendered 1`] = `
<div
class="dropdown-menu sidebar-item-warning-message"
data-testid="warning-text"
>
<p
class="text"
>
<gl-sprintf-stub
message="Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
issuabledisplayname="issue"
/>
</div>
`;
exports[`Edit Form Dropdown In merge request page when locked the appropriate warning text is rendered 1`] = `
<div
class="dropdown-menu sidebar-item-warning-message"
data-testid="warning-text"
>
<p
class="text"
>
<gl-sprintf-stub
message="Unlock this %{issuableDisplayName}? %{strongStart}Everyone%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
islocked="true"
issuabledisplayname="merge request"
/>
</div>
`;
exports[`Edit Form Dropdown In merge request page when unlocked the appropriate warning text is rendered 1`] = `
<div
class="dropdown-menu sidebar-item-warning-message"
data-testid="warning-text"
>
<p
class="text"
>
<gl-sprintf-stub
message="Lock this %{issuableDisplayName}? Only %{strongStart}project members%{strongEnd} will be able to comment."
/>
</p>
<edit-form-buttons-stub
issuabledisplayname="merge request"
/>
</div>
`;
......@@ -38,18 +38,16 @@ describe('Edit Form Dropdown', () => {
});
describe.each`
isLocked | lockStatusText | lockAction | warningText
${false} | ${'unlocked'} | ${'Lock'} | ${'Only project members will be able to comment.'}
${true} | ${'locked'} | ${'Unlock'} | ${'Everyone will be able to comment.'}
`('when $lockStatusText', ({ isLocked, lockAction, warningText }) => {
isLocked | lockStatusText
${false} | ${'unlocked'}
${true} | ${'locked'}
`('when $lockStatusText', ({ isLocked }) => {
beforeEach(() => {
createComponent({ props: { isLocked } });
});
it(`the appropriate warning text is rendered`, () => {
expect(findWarningText().text()).toContain(
`${lockAction} this ${issuableDisplayName}? ${warningText}`,
);
expect(findWarningText().element).toMatchSnapshot();
});
});
});
......
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