Upgrade @gitlab/eslint-plugin to v10.0.0

This upgrades @gitlab/eslint-plugin to v10.0.0 and fixes offenses for
the new require-valid-i18n-helpers and vue-require-valid-i18n-helpers
rules.
parent f431f18e
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
/> />
</form> </form>
<template #modal-footer> <template #modal-footer>
<gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button> <gl-button @click="onCancel">{{ __('Cancel') }}</gl-button>
<gl-button <gl-button
:disabled="!canSubmit" :disabled="!canSubmit"
category="secondary" category="secondary"
......
...@@ -3,7 +3,7 @@ import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
import { GlSingleStat } from '@gitlab/ui/dist/charts'; import { GlSingleStat } from '@gitlab/ui/dist/charts';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { number } from '~/lib/utils/unit_format'; import { number } from '~/lib/utils/unit_format';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import usageTrendsCountQuery from '../graphql/queries/usage_trends_count.query.graphql'; import usageTrendsCountQuery from '../graphql/queries/usage_trends_count.query.graphql';
const defaultPrecision = 0; const defaultPrecision = 0;
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
mergeRequests: s__('UsageTrends|Merge requests'), mergeRequests: s__('UsageTrends|Merge requests'),
pipelines: s__('UsageTrends|Pipelines'), pipelines: s__('UsageTrends|Pipelines'),
}, },
loadCountsError: s__('Could not load usage counts. Please refresh the page to try again.'), loadCountsError: __('Could not load usage counts. Please refresh the page to try again.'),
}, },
}; };
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlSprintf, GlModal } from '@gitlab/ui'; import { GlSprintf, GlModal } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Badge from './badge.vue'; import Badge from './badge.vue';
import BadgeForm from './badge_form.vue'; import BadgeForm from './badge_form.vue';
import BadgeList from './badge_list.vue'; import BadgeList from './badge_list.vue';
...@@ -25,13 +25,13 @@ export default { ...@@ -25,13 +25,13 @@ export default {
...mapState(['badgeInModal', 'isEditing']), ...mapState(['badgeInModal', 'isEditing']),
primaryProps() { primaryProps() {
return { return {
text: s__('Delete badge'), text: __('Delete badge'),
attributes: [{ category: 'primary' }, { variant: 'danger' }], attributes: [{ category: 'primary' }, { variant: 'danger' }],
}; };
}, },
cancelProps() { cancelProps() {
return { return {
text: s__('Cancel'), text: __('Cancel'),
}; };
}, },
}, },
......
<script> <script>
import { GlModal, GlSprintf, GlLink, GlButton } from '@gitlab/ui'; import { GlModal, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
const trackingMixin = Tracking.mixin(); const trackingMixin = Tracking.mixin();
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}, },
}, },
i18n: { i18n: {
modalTitle: s__("That's it, well done!"), modalTitle: __("That's it, well done!"),
pipelinesButton: s__('MR widget|See your pipeline in action'), pipelinesButton: s__('MR widget|See your pipeline in action'),
mergeRequestButton: s__('MR widget|Back to the Merge request'), mergeRequestButton: s__('MR widget|Back to the Merge request'),
bodyMessage: s__( bodyMessage: s__(
......
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
) )
}}</span> }}</span>
<template #modal-footer> <template #modal-footer>
<gl-button variant="secondary" @click="handleCancel">{{ s__('Cancel') }}</gl-button> <gl-button variant="secondary" @click="handleCancel">{{ __('Cancel') }}</gl-button>
<template v-if="confirmCleanup"> <template v-if="confirmCleanup">
<gl-button <gl-button
:disabled="!canSubmit" :disabled="!canSubmit"
......
...@@ -91,7 +91,7 @@ export const I18N_INSTALL_AGENT_MODAL = { ...@@ -91,7 +91,7 @@ export const I18N_INSTALL_AGENT_MODAL = {
), ),
basicInstallTitle: s__('ClusterAgents|Recommended installation method'), basicInstallTitle: s__('ClusterAgents|Recommended installation method'),
basicInstallBody: s__( basicInstallBody: __(
`Open a CLI and connect to the cluster you want to install the Agent in. Use this installation method to minimize any manual steps. The token is already included in the command.`, `Open a CLI and connect to the cluster you want to install the Agent in. Use this installation method to minimize any manual steps. The token is already included in the command.`,
), ),
...@@ -100,7 +100,7 @@ export const I18N_INSTALL_AGENT_MODAL = { ...@@ -100,7 +100,7 @@ export const I18N_INSTALL_AGENT_MODAL = {
'ClusterAgents|For alternative installation methods %{linkStart}go to the documentation%{linkEnd}.', 'ClusterAgents|For alternative installation methods %{linkStart}go to the documentation%{linkEnd}.',
), ),
registrationErrorTitle: s__('Failed to register Agent'), registrationErrorTitle: __('Failed to register Agent'),
unknownError: s__('ClusterAgents|An unknown error occurred. Please try again.'), unknownError: s__('ClusterAgents|An unknown error occurred. Please try again.'),
}; };
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
</gl-sprintf> </gl-sprintf>
{{ s__('DeployTokens|This action cannot be undone.') }} {{ s__('DeployTokens|This action cannot be undone.') }}
<template #modal-footer> <template #modal-footer>
<gl-button category="secondary" @click="cancelHandler">{{ s__('Cancel') }}</gl-button> <gl-button category="secondary" @click="cancelHandler">{{ __('Cancel') }}</gl-button>
<gl-button <gl-button
category="primary" category="primary"
variant="danger" variant="danger"
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
mixins: [glFeatureFlagsMixin(), IdState({ idProp: (vm) => vm.diffFile.file_hash })], mixins: [glFeatureFlagsMixin(), IdState({ idProp: (vm) => vm.diffFile.file_hash })],
i18n: { i18n: {
...DIFF_FILE_HEADER, ...DIFF_FILE_HEADER,
compareButtonLabel: s__('Compare submodule commit revisions'), compareButtonLabel: __('Compare submodule commit revisions'),
}, },
props: { props: {
discussionPath: { discussionPath: {
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
const truncatedOldSha = escape(truncateSha(this.diffFile.submodule_compare.old_sha)); const truncatedOldSha = escape(truncateSha(this.diffFile.submodule_compare.old_sha));
const truncatedNewSha = escape(truncateSha(this.diffFile.submodule_compare.new_sha)); const truncatedNewSha = escape(truncateSha(this.diffFile.submodule_compare.new_sha));
return sprintf( return sprintf(
s__('Compare %{oldCommitId}...%{newCommitId}'), __('Compare %{oldCommitId}...%{newCommitId}'),
{ {
oldCommitId: `<span class="commit-sha">${truncatedOldSha}</span>`, oldCommitId: `<span class="commit-sha">${truncatedOldSha}</span>`,
newCommitId: `<span class="commit-sha">${truncatedNewSha}</span>`, newCommitId: `<span class="commit-sha">${truncatedNewSha}</span>`,
......
<script> <script>
import { GlTooltipDirective, GlModal } from '@gitlab/ui'; import { GlTooltipDirective, GlModal } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
}, },
cancelProps() { cancelProps() {
return { return {
text: s__('Cancel'), text: __('Cancel'),
}; };
}, },
confirmDeleteMessage() { confirmDeleteMessage() {
......
...@@ -6,7 +6,7 @@ import Visibility from 'visibilityjs'; ...@@ -6,7 +6,7 @@ import Visibility from 'visibilityjs';
import createFlash from '~/flash'; import createFlash from '~/flash';
import Poll from '../../lib/utils/poll'; import Poll from '../../lib/utils/poll';
import { getParameterByName } from '../../lib/utils/url_utility'; import { getParameterByName } from '../../lib/utils/url_utility';
import { s__ } from '../../locale'; import { s__, __ } from '../../locale';
import tabs from '../../vue_shared/components/navigation_tabs.vue'; import tabs from '../../vue_shared/components/navigation_tabs.vue';
import tablePagination from '../../vue_shared/components/pagination/table_pagination.vue'; import tablePagination from '../../vue_shared/components/pagination/table_pagination.vue';
import container from '../components/container.vue'; import container from '../components/container.vue';
...@@ -207,13 +207,13 @@ export default { ...@@ -207,13 +207,13 @@ export default {
tabs() { tabs() {
return [ return [
{ {
name: s__('Available'), name: __('Available'),
scope: 'available', scope: 'available',
count: this.state.availableCounter, count: this.state.availableCounter,
isActive: this.scope === 'available', isActive: this.scope === 'available',
}, },
{ {
name: s__('Stopped'), name: __('Stopped'),
scope: 'stopped', scope: 'stopped',
count: this.state.stoppedCounter, count: this.state.stoppedCounter,
isActive: this.scope === 'stopped', isActive: this.scope === 'stopped',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlModal, GlButton } from '@gitlab/ui'; import { GlModal, GlButton } from '@gitlab/ui';
import { mapActions, mapState, mapGetters } from 'vuex'; import { mapActions, mapState, mapGetters } from 'vuex';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { __, sprintf, s__ } from '~/locale'; import { __, sprintf } from '~/locale';
import { modalTypes } from '../../constants'; import { modalTypes } from '../../constants';
import { trimPathComponents, getPathParent } from '../../utils'; import { trimPathComponents, getPathParent } from '../../utils';
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
if (this.modalType === modalTypes.rename) { if (this.modalType === modalTypes.rename) {
if (this.entries[this.entryName] && !this.entries[this.entryName].deleted) { if (this.entries[this.entryName] && !this.entries[this.entryName].deleted) {
createFlash({ createFlash({
message: sprintf(s__('The name "%{name}" is already taken in this directory.'), { message: sprintf(__('The name "%{name}" is already taken in this directory.'), {
name: this.entryName, name: this.entryName,
}), }),
fadeTransition: false, fadeTransition: false,
......
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
<gl-empty-state <gl-empty-state
v-else-if="!hasGroups" v-else-if="!hasGroups"
:title="s__('BulkImport|You have no groups to import')" :title="s__('BulkImport|You have no groups to import')"
:description="s__('Check your source instance permissions.')" :description="__('Check your source instance permissions.')"
/> />
<template v-else> <template v-else>
<div <div
......
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
</gl-sprintf> </gl-sprintf>
</p> </p>
<template #modal-footer> <template #modal-footer>
<gl-button category="secondary" @click="cancelHandler">{{ s__('Cancel') }}</gl-button> <gl-button category="secondary" @click="cancelHandler">{{ __('Cancel') }}</gl-button>
</template> </template>
</gl-modal> </gl-modal>
</div> </div>
......
...@@ -4,7 +4,7 @@ import Visibility from 'visibilityjs'; ...@@ -4,7 +4,7 @@ import Visibility from 'visibilityjs';
import createFlash from '~/flash'; import createFlash from '~/flash';
import Poll from '~/lib/utils/poll'; import Poll from '~/lib/utils/poll';
import { visitUrl } from '~/lib/utils/url_utility'; import { visitUrl } from '~/lib/utils/url_utility';
import { __, s__, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import { import {
IssuableStatus, IssuableStatus,
IssuableStatusText, IssuableStatusText,
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
return false; return false;
}, },
defaultErrorMessage() { defaultErrorMessage() {
return sprintf(s__('Error updating %{issuableType}'), { issuableType: this.issuableType }); return sprintf(__('Error updating %{issuableType}'), { issuableType: this.issuableType });
}, },
isClosed() { isClosed() {
return this.issuableStatus === IssuableStatus.Closed; return this.issuableStatus === IssuableStatus.Closed;
...@@ -437,7 +437,7 @@ export default { ...@@ -437,7 +437,7 @@ export default {
}) })
.catch(() => { .catch(() => {
createFlash({ createFlash({
message: sprintf(s__('Error deleting %{issuableType}'), { message: sprintf(__('Error deleting %{issuableType}'), {
issuableType: this.issuableType, issuableType: this.issuableType,
}), }),
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import $ from 'jquery'; import $ from 'jquery';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { s__, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import TaskList from '../../task_list'; import TaskList from '../../task_list';
import animateMixin from '../mixins/animate'; import animateMixin from '../mixins/animate';
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
taskListUpdateError() { taskListUpdateError() {
createFlash({ createFlash({
message: sprintf( message: sprintf(
s__( __(
'Someone edited this %{issueType} at the same time you did. The description has been updated and you will need to make your changes again.', 'Someone edited this %{issueType} at the same time you did. The description has been updated and you will need to make your changes again.',
), ),
{ {
......
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
/** /**
* Generates empty state messages for Service Desk issues list. * Generates empty state messages for Service Desk issues list.
...@@ -25,7 +25,7 @@ export function generateMessages(emptyStateMeta) { ...@@ -25,7 +25,7 @@ export function generateMessages(emptyStateMeta) {
const commonDescription = ` const commonDescription = `
<span>${serviceDeskSupportedMessage}</span> <span>${serviceDeskSupportedMessage}</span>
<a href="${serviceDeskHelpPage}">${s__('Learn more.')}</a>`; <a href="${serviceDeskHelpPage}">${__('Learn more.')}</a>`;
return { return {
serviceDeskEnabledAndCanEditProjectSettings: { serviceDeskEnabledAndCanEditProjectSettings: {
...@@ -60,7 +60,7 @@ export function generateMessages(emptyStateMeta) { ...@@ -60,7 +60,7 @@ export function generateMessages(emptyStateMeta) {
'ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email.', 'ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email.',
), ),
primaryLink: incomingEmailHelpPage, primaryLink: incomingEmailHelpPage,
primaryText: s__('Learn more.'), primaryText: __('Learn more.'),
}, },
serviceDeskIsNotEnabled: { serviceDeskIsNotEnabled: {
title: s__('ServiceDesk|Service Desk is not enabled'), title: s__('ServiceDesk|Service Desk is not enabled'),
......
...@@ -14,33 +14,33 @@ import { s__, n__, __, sprintf } from '../../../locale'; ...@@ -14,33 +14,33 @@ import { s__, n__, __, sprintf } from '../../../locale';
export const getMonthNames = (abbreviated) => { export const getMonthNames = (abbreviated) => {
if (abbreviated) { if (abbreviated) {
return [ return [
s__('Jan'), __('Jan'),
s__('Feb'), __('Feb'),
s__('Mar'), __('Mar'),
s__('Apr'), __('Apr'),
s__('May'), __('May'),
s__('Jun'), __('Jun'),
s__('Jul'), __('Jul'),
s__('Aug'), __('Aug'),
s__('Sep'), __('Sep'),
s__('Oct'), __('Oct'),
s__('Nov'), __('Nov'),
s__('Dec'), __('Dec'),
]; ];
} }
return [ return [
s__('January'), __('January'),
s__('February'), __('February'),
s__('March'), __('March'),
s__('April'), __('April'),
s__('May'), __('May'),
s__('June'), __('June'),
s__('July'), __('July'),
s__('August'), __('August'),
s__('September'), __('September'),
s__('October'), __('October'),
s__('November'), __('November'),
s__('December'), __('December'),
]; ];
}; };
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
}} }}
<a :href="clusterApplicationsDocumentationPath"> <a :href="clusterApplicationsDocumentationPath">
<strong> <strong>
{{ s__('View Documentation') }} {{ __('View Documentation') }}
</strong> </strong>
</a> </a>
</gl-alert> </gl-alert>
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
return !(this.form.fileName && !this.form.fileName.endsWith('.yml')); return !(this.form.fileName && !this.form.fileName.endsWith('.yml'));
}, },
fileNameFeedback() { fileNameFeedback() {
return !this.fileNameState ? s__('The file name should have a .yml extension') : ''; return !this.fileNameState ? __('The file name should have a .yml extension') : '';
}, },
}, },
mounted() { mounted() {
......
...@@ -78,8 +78,8 @@ export default { ...@@ -78,8 +78,8 @@ export default {
v-if="resolveAllDiscussionsIssuePath && !allResolved" v-if="resolveAllDiscussionsIssuePath && !allResolved"
v-gl-tooltip v-gl-tooltip
:href="resolveAllDiscussionsIssuePath" :href="resolveAllDiscussionsIssuePath"
:title="s__('Create issue to resolve all threads')" :title="__('Create issue to resolve all threads')"
:aria-label="s__('Create issue to resolve all threads')" :aria-label="__('Create issue to resolve all threads')"
class="new-issue-for-discussion discussion-create-issue-btn" class="new-issue-for-discussion discussion-create-issue-btn"
icon="issue-new" icon="issue-new"
/> />
......
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}, },
primaryProps() { primaryProps() {
return { return {
text: s__('Delete project'), text: __('Delete project'),
attributes: [{ variant: 'danger' }, { category: 'primary' }, { disabled: !this.canSubmit }], attributes: [{ variant: 'danger' }, { category: 'primary' }, { disabled: !this.canSubmit }],
}; };
}, },
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
<template> <template>
<new-namespace-page <new-namespace-page
:jump-to-last-persisted-panel="hasErrors" :jump-to-last-persisted-panel="hasErrors"
:initial-breadcrumb="s__('New group')" :initial-breadcrumb="__('New group')"
:panels="$options.PANELS" :panels="$options.PANELS"
:title="s__('GroupsNew|Create new group')" :title="s__('GroupsNew|Create new group')"
persistence-key="new_group_last_active_tab" persistence-key="new_group_last_active_tab"
......
...@@ -3,7 +3,7 @@ import { GlModal } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlModal } from '@gitlab/ui';
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { visitUrl } from '~/lib/utils/url_utility'; import { visitUrl } from '~/lib/utils/url_utility';
import { s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
export default { export default {
components: { components: {
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
attributes: [{ variant: 'warning' }], attributes: [{ variant: 'warning' }],
}, },
cancelAction: { cancelAction: {
text: s__('Cancel'), text: __('Cancel'),
attributes: [], attributes: [],
}, },
}; };
......
...@@ -72,18 +72,18 @@ export default { ...@@ -72,18 +72,18 @@ export default {
return [ return [
{ {
value: KEY_EVERY_DAY, value: KEY_EVERY_DAY,
text: sprintf(s__(`Every day (at %{time})`), { time: this.formattedTime }), text: sprintf(__(`Every day (at %{time})`), { time: this.formattedTime }),
}, },
{ {
value: KEY_EVERY_WEEK, value: KEY_EVERY_WEEK,
text: sprintf(s__('Every week (%{weekday} at %{time})'), { text: sprintf(__('Every week (%{weekday} at %{time})'), {
weekday: this.weekday, weekday: this.weekday,
time: this.formattedTime, time: this.formattedTime,
}), }),
}, },
{ {
value: KEY_EVERY_MONTH, value: KEY_EVERY_MONTH,
text: sprintf(s__('Every month (Day %{day} at %{time})'), { text: sprintf(__('Every month (Day %{day} at %{time})'), {
day: this.randomDay, day: this.randomDay,
time: this.formattedTime, time: this.formattedTime,
}), }),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlIcon, GlSprintf, GlLink, GlFormCheckbox, GlToggle } from '@gitlab/ui'; import { GlIcon, GlSprintf, GlLink, GlFormCheckbox, GlToggle } from '@gitlab/ui';
import settingsMixin from 'ee_else_ce/pages/projects/shared/permissions/mixins/settings_pannel_mixin'; import settingsMixin from 'ee_else_ce/pages/projects/shared/permissions/mixins/settings_pannel_mixin';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { import {
visibilityOptions, visibilityOptions,
visibilityLevelDescriptions, visibilityLevelDescriptions,
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
operationsLabel: s__('ProjectSettings|Operations'), operationsLabel: s__('ProjectSettings|Operations'),
packagesLabel: s__('ProjectSettings|Packages'), packagesLabel: s__('ProjectSettings|Packages'),
pagesLabel: s__('ProjectSettings|Pages'), pagesLabel: s__('ProjectSettings|Pages'),
ciCdLabel: s__('CI/CD'), ciCdLabel: __('CI/CD'),
repositoryLabel: s__('ProjectSettings|Repository'), repositoryLabel: s__('ProjectSettings|Repository'),
requirementsLabel: s__('ProjectSettings|Requirements'), requirementsLabel: s__('ProjectSettings|Requirements'),
securityAndComplianceLabel: s__('ProjectSettings|Security & Compliance'), securityAndComplianceLabel: s__('ProjectSettings|Security & Compliance'),
......
...@@ -12,7 +12,7 @@ import { ...@@ -12,7 +12,7 @@ import {
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import csrf from '~/lib/utils/csrf'; import csrf from '~/lib/utils/csrf';
import { setUrlFragment } from '~/lib/utils/url_utility'; import { setUrlFragment } from '~/lib/utils/url_utility';
import { s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import MarkdownField from '~/vue_shared/components/markdown/field.vue'; import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { import {
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
), ),
}, },
}, },
feedbackTip: s__( feedbackTip: __(
'Tell us your experiences with the new Markdown editor %{linkStart}in this feedback issue%{linkEnd}.', 'Tell us your experiences with the new Markdown editor %{linkStart}in this feedback issue%{linkEnd}.',
), ),
}, },
......
<script> <script>
import { GlButton, GlModal, GlModalDirective, GlSegmentedControl } from '@gitlab/ui'; import { GlButton, GlModal, GlModalDirective, GlSegmentedControl } from '@gitlab/ui';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { sortOrders, sortOrderOptions } from '../constants'; import { sortOrders, sortOrderOptions } from '../constants';
import RequestWarning from './request_warning.vue'; import RequestWarning from './request_warning.vue';
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
const summary = {}; const summary = {};
if (!this.metricDetails.summaryOptions?.hideTotal) { if (!this.metricDetails.summaryOptions?.hideTotal) {
summary[s__('Total')] = this.metricDetails.calls; summary[__('Total')] = this.metricDetails.calls;
} }
if (!this.metricDetails.summaryOptions?.hideDuration) { if (!this.metricDetails.summaryOptions?.hideDuration) {
......
...@@ -12,7 +12,7 @@ import { produce } from 'immer'; ...@@ -12,7 +12,7 @@ import { produce } from 'immer';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
import { historyPushState } from '~/lib/utils/common_utils'; import { historyPushState } from '~/lib/utils/common_utils';
import { setUrlParams } from '~/lib/utils/url_utility'; import { setUrlParams } from '~/lib/utils/url_utility';
import { s__ } from '~/locale'; import { __ } from '~/locale';
import { import {
BRANCH_PAGINATION_LIMIT, BRANCH_PAGINATION_LIMIT,
BRANCH_SEARCH_DEBOUNCE, BRANCH_SEARCH_DEBOUNCE,
...@@ -25,9 +25,9 @@ import getLastCommitBranchQuery from '~/pipeline_editor/graphql/queries/client/l ...@@ -25,9 +25,9 @@ import getLastCommitBranchQuery from '~/pipeline_editor/graphql/queries/client/l
export default { export default {
i18n: { i18n: {
dropdownHeader: s__('Switch branch'), dropdownHeader: __('Switch branch'),
title: s__('Branches'), title: __('Branches'),
fetchError: s__('Unable to fetch branch list for this project.'), fetchError: __('Unable to fetch branch list for this project.'),
}, },
inputDebounce: BRANCH_SEARCH_DEBOUNCE, inputDebounce: BRANCH_SEARCH_DEBOUNCE,
components: { components: {
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
}, },
primaryProps() { primaryProps() {
return { return {
text: s__('Delete account'), text: __('Delete account'),
attributes: [ attributes: [
{ variant: 'danger', 'data-qa-selector': 'confirm_delete_account_button' }, { variant: 'danger', 'data-qa-selector': 'confirm_delete_account_button' },
{ category: 'primary' }, { category: 'primary' },
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}, },
cancelProps() { cancelProps() {
return { return {
text: s__('Cancel'), text: __('Cancel'),
}; };
}, },
canSubmit() { canSubmit() {
......
...@@ -3,7 +3,7 @@ import { GlSafeHtmlDirective as SafeHtml, GlButton, GlModal, GlModalDirective } ...@@ -3,7 +3,7 @@ import { GlSafeHtmlDirective as SafeHtml, GlButton, GlModal, GlModalDirective }
import { escape } from 'lodash'; import { escape } from 'lodash';
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
export default { export default {
components: { components: {
...@@ -58,7 +58,7 @@ Please update your Git repository remotes as soon as possible.`), ...@@ -58,7 +58,7 @@ Please update your Git repository remotes as soon as possible.`),
}, },
primaryProps() { primaryProps() {
return { return {
text: s__('Update username'), text: __('Update username'),
attributes: [ attributes: [
{ variant: 'warning' }, { variant: 'warning' },
{ category: 'primary' }, { category: 'primary' },
...@@ -68,7 +68,7 @@ Please update your Git repository remotes as soon as possible.`), ...@@ -68,7 +68,7 @@ Please update your Git repository remotes as soon as possible.`),
}, },
cancelProps() { cancelProps() {
return { return {
text: s__('Cancel'), text: __('Cancel'),
}; };
}, },
}, },
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
<template> <template>
<new-namespace-page <new-namespace-page
:initial-breadcrumb="s__('New project')" :initial-breadcrumb="__('New project')"
:panels="availablePanels" :panels="availablePanels"
:jump-to-last-persisted-panel="hasErrors" :jump-to-last-persisted-panel="hasErrors"
:title="s__('ProjectsNew|Create new project')" :title="s__('ProjectsNew|Create new project')"
......
...@@ -51,7 +51,7 @@ export const ERROR_MESSAGE = s__( ...@@ -51,7 +51,7 @@ export const ERROR_MESSAGE = s__(
'UsageQuota|Something went wrong while fetching project storage statistics', 'UsageQuota|Something went wrong while fetching project storage statistics',
); );
export const LEARN_MORE_LABEL = s__('Learn more.'); export const LEARN_MORE_LABEL = __('Learn more.');
export const USAGE_QUOTAS_LABEL = s__('UsageQuota|Usage Quotas'); export const USAGE_QUOTAS_LABEL = s__('UsageQuota|Usage Quotas');
export const HELP_LINK_ARIA_LABEL = s__('UsageQuota|%{linkTitle} help link'); export const HELP_LINK_ARIA_LABEL = s__('UsageQuota|%{linkTitle} help link');
export const TOTAL_USAGE_DEFAULT_TEXT = __('N/A'); export const TOTAL_USAGE_DEFAULT_TEXT = __('N/A');
......
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
}; };
this.isLoading = false; this.isLoading = false;
createFlash({ createFlash({
message: s__('Something went wrong on our end'), message: __('Something went wrong on our end'),
}); });
}, },
initPolling() { initPolling() {
......
<script> <script>
import { GlLink, GlLoadingIcon, GlIcon } from '@gitlab/ui'; import { GlLink, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { sprintf, n__, s__ } from '~/locale'; import { sprintf, __, n__ } from '~/locale';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue'; import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import { parseIssuableData } from '../../issue_show/utils/parse_data'; import { parseIssuableData } from '../../issue_show/utils/parse_data';
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
this.totalCount, this.totalCount,
); );
return sprintf(s__('%{mrText}, this issue will be closed automatically.'), { mrText }); return sprintf(__('%{mrText}, this issue will be closed automatically.'), { mrText });
}, },
}, },
mounted() { mounted() {
......
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { normalizeHeaders } from '~/lib/utils/common_utils'; import { normalizeHeaders } from '~/lib/utils/common_utils';
import { s__ } from '~/locale'; import { __ } from '~/locale';
import * as types from './mutation_types'; import * as types from './mutation_types';
const REQUEST_PAGE_COUNT = 100; const REQUEST_PAGE_COUNT = 100;
...@@ -30,7 +30,7 @@ export const fetchMergeRequests = ({ state, dispatch }) => { ...@@ -30,7 +30,7 @@ export const fetchMergeRequests = ({ state, dispatch }) => {
.catch(() => { .catch(() => {
dispatch('receiveDataError'); dispatch('receiveDataError');
createFlash({ createFlash({
message: s__('Something went wrong while fetching related merge requests.'), message: __('Something went wrong while fetching related merge requests.'),
}); });
}); });
}; };
<script> <script>
import { GlFormRadioGroup, GlFormRadio } from '@gitlab/ui'; import { GlFormRadioGroup, GlFormRadio } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { sprintf, s__ } from '~/locale'; import { sprintf, __ } from '~/locale';
export default { export default {
name: 'RadioFilter', name: 'RadioFilter',
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
...mapActions(['setQuery']), ...mapActions(['setQuery']),
radioLabel(filter) { radioLabel(filter) {
return filter.value === this.ANY.value return filter.value === this.ANY.value
? sprintf(s__('Any %{header}'), { header: this.filterData.header.toLowerCase() }) ? sprintf(__('Any %{header}'), { header: this.filterData.header.toLowerCase() })
: filter.label; : filter.label;
}, },
}, },
......
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
updatedFileDescription() { updatedFileDescription() {
const { sourcePath } = this.appData; const { sourcePath } = this.appData;
return sprintf(s__('Update %{sourcePath} file'), { sourcePath }); return sprintf(__('Update %{sourcePath} file'), { sourcePath });
}, },
}, },
created() { created() {
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
translations: { translations: {
createdTimeagoLabel: s__('UserList|created %{timeago}'), createdTimeagoLabel: s__('UserList|created %{timeago}'),
deleteListTitle: s__('UserList|Delete %{name}?'), deleteListTitle: s__('UserList|Delete %{name}?'),
deleteListMessage: s__('User list %{name} will be removed. Are you sure?'), deleteListMessage: __('User list %{name} will be removed. Are you sure?'),
editUserListLabel: s__('FeatureFlags|Edit User List'), editUserListLabel: s__('FeatureFlags|Edit User List'),
}, },
modal: { modal: {
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
right right
data-qa-selector="download_dropdown" data-qa-selector="download_dropdown"
> >
<gl-dropdown-section-header>{{ s__('Download as') }}</gl-dropdown-section-header> <gl-dropdown-section-header>{{ __('Download as') }}</gl-dropdown-section-header>
<gl-dropdown-item <gl-dropdown-item
:href="mr.emailPatchesPath" :href="mr.emailPatchesPath"
class="js-download-email-patches" class="js-download-email-patches"
......
import { s__ } from '~/locale'; import { __ } from '~/locale';
/** /**
* Validation messages will take priority based on the property order. * Validation messages will take priority based on the property order.
...@@ -12,11 +12,11 @@ import { s__ } from '~/locale'; ...@@ -12,11 +12,11 @@ import { s__ } from '~/locale';
const defaultFeedbackMap = { const defaultFeedbackMap = {
valueMissing: { valueMissing: {
isInvalid: (el) => el.validity?.valueMissing, isInvalid: (el) => el.validity?.valueMissing,
message: s__('Please fill out this field.'), message: __('Please fill out this field.'),
}, },
urlTypeMismatch: { urlTypeMismatch: {
isInvalid: (el) => el.type === 'url' && el.validity?.typeMismatch, isInvalid: (el) => el.type === 'url' && el.validity?.typeMismatch,
message: s__('Please enter a valid URL format, ex: http://www.example.com/home'), message: __('Please enter a valid URL format, ex: http://www.example.com/home'),
}, },
}; };
......
...@@ -15,7 +15,7 @@ import dateFormat from 'dateformat'; ...@@ -15,7 +15,7 @@ import dateFormat from 'dateformat';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { dateFormats } from '~/analytics/shared/constants'; import { dateFormats } from '~/analytics/shared/constants';
import { approximateDuration, differenceInSeconds } from '~/lib/utils/datetime_utility'; import { approximateDuration, differenceInSeconds } from '~/lib/utils/datetime_utility';
import { s__, n__ } from '~/locale'; import { __, s__, n__ } from '~/locale';
import { filterToQueryObject } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; import { filterToQueryObject } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
import { import {
THROUGHPUT_TABLE_STRINGS, THROUGHPUT_TABLE_STRINGS,
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
}, },
{ {
key: 'commits', key: 'commits',
label: s__('Commits'), label: __('Commits'),
tdClass: 'merge-request-analytics-td', tdClass: 'merge-request-analytics-td',
thAttr: TH_TEST_ID, thAttr: TH_TEST_ID,
}, },
......
<script> <script>
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
const HEADERS = { const HEADERS = {
name: s__('ApprovalRule|Name'), name: s__('ApprovalRule|Name'),
members: s__('ApprovalRule|Approvers'), members: s__('ApprovalRule|Approvers'),
approvalsRequired: s__('ApprovalRule|Approvals required'), approvalsRequired: s__('ApprovalRule|Approvals required'),
branches: s__('Target branch'), branches: __('Target branch'),
}; };
export default { export default {
......
...@@ -4,7 +4,7 @@ import { mapGetters } from 'vuex'; ...@@ -4,7 +4,7 @@ import { mapGetters } from 'vuex';
// extends a valid Vue single file component. // extends a valid Vue single file component.
/* eslint-disable @gitlab/no-runtime-template-compiler */ /* eslint-disable @gitlab/no-runtime-template-compiler */
import BoardListHeaderFoss from '~/boards/components/board_list_header.vue'; import BoardListHeaderFoss from '~/boards/components/board_list_header.vue';
import { n__, __, sprintf, s__ } from '~/locale'; import { n__, __, sprintf } from '~/locale';
export default { export default {
extends: BoardListHeaderFoss, extends: BoardListHeaderFoss,
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
const { totalWeight } = this.list; const { totalWeight } = this.list;
if (this.weightFeatureAvailable) { if (this.weightFeatureAvailable) {
return sprintf(s__('%{totalWeight} total weight'), { totalWeight }); return sprintf(__('%{totalWeight} total weight'), { totalWeight });
} }
return null; return null;
......
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
} from '@gitlab/ui'; } from '@gitlab/ui';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue'; import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue';
import Environment from './environment.vue'; import Environment from './environment.vue';
import ProjectHeader from './project_header.vue'; import ProjectHeader from './project_header.vue';
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
"EnvironmentsDashboard|The environments dashboard provides a summary of each project's environments' status, including pipeline and alert statuses.", "EnvironmentsDashboard|The environments dashboard provides a summary of each project's environments' status, including pipeline and alert statuses.",
), ),
viewDocumentationButton: s__('View documentation'), viewDocumentationButton: __('View documentation'),
components: { components: {
Environment, Environment,
......
...@@ -308,7 +308,7 @@ export const requestEpicCreateSuccess = (_, webUrl) => visitUrl(webUrl); ...@@ -308,7 +308,7 @@ export const requestEpicCreateSuccess = (_, webUrl) => visitUrl(webUrl);
export const requestEpicCreateFailure = ({ commit }) => { export const requestEpicCreateFailure = ({ commit }) => {
commit(types.REQUEST_EPIC_CREATE_FAILURE); commit(types.REQUEST_EPIC_CREATE_FAILURE);
createFlash({ createFlash({
message: s__('Error creating epic'), message: __('Error creating epic'),
}); });
}; };
export const createEpic = ({ state, dispatch }) => { export const createEpic = ({ state, dispatch }) => {
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
SourceEditor, SourceEditor,
}, },
i18n: { i18n: {
helpText: s__( helpText: __(
'This code snippet contains everything reflected in the configuration form. Copy and paste it into %{linkStart}.gitlab-ci.yml%{linkEnd} file and save your changes. Future %{scanType} scans will use these settings.', 'This code snippet contains everything reflected in the configuration form. Copy and paste it into %{linkStart}.gitlab-ci.yml%{linkEnd} file and save your changes. Future %{scanType} scans will use these settings.',
), ),
modalTitle: s__('SecurityConfiguration|%{scanType} configuration code snippet'), modalTitle: s__('SecurityConfiguration|%{scanType} configuration code snippet'),
......
<script> <script>
import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
export default { export default {
components: { components: {
...@@ -21,11 +21,11 @@ export default { ...@@ -21,11 +21,11 @@ export default {
}, },
modal: { modal: {
actionPrimary: { actionPrimary: {
text: s__('Delete corpus'), text: __('Delete corpus'),
attributes: { variant: 'danger', 'data-testid': 'modal-confirm' }, attributes: { variant: 'danger', 'data-testid': 'modal-confirm' },
}, },
actionCancel: { actionCancel: {
text: s__('Cancel'), text: __('Cancel'),
}, },
}, },
computed: { computed: {
......
<script> <script>
import { GlAlert, GlLink, GlLoadingIcon, GlSprintf } from '@gitlab/ui'; import { GlAlert, GlLink, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import DismissibleFeedbackAlert from '~/vue_shared/components/dismissible_feedback_alert.vue'; import DismissibleFeedbackAlert from '~/vue_shared/components/dismissible_feedback_alert.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import ConfigurationPageLayout from '../../components/configuration_page_layout.vue'; import ConfigurationPageLayout from '../../components/configuration_page_layout.vue';
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}, },
}, },
i18n: { i18n: {
feedbackAlertMessage: s__(` feedbackAlertMessage: __(`
As we continue to build more features for SAST, we'd love your feedback As we continue to build more features for SAST, we'd love your feedback
on the SAST configuration feature in %{linkStart}this issue%{linkEnd}.`), on the SAST configuration feature in %{linkStart}this issue%{linkEnd}.`),
helpText: s__( helpText: s__(
......
...@@ -139,8 +139,8 @@ export default { ...@@ -139,8 +139,8 @@ export default {
cover all languages across your project, and only run if the language is cover all languages across your project, and only run if the language is
detected in the Merge Request.`, detected in the Merge Request.`,
), ),
analyzersTipHeading: s__('We recommend leaving all SAST analyzers enabled'), analyzersTipHeading: __('We recommend leaving all SAST analyzers enabled'),
analyzersTipBody: s__( analyzersTipBody: __(
'Keeping all SAST analyzers enabled future-proofs the project in case new languages are added later on. Determining which analyzers apply is a process that consumes minimal resources and adds minimal time to the pipeline. Leaving all SAST analyzers enabled ensures maximum coverage.', 'Keeping all SAST analyzers enabled future-proofs the project in case new languages are added later on. Determining which analyzers apply is a process that consumes minimal resources and adds minimal time to the pipeline. Leaving all SAST analyzers enabled ensures maximum coverage.',
), ),
}, },
......
...@@ -113,9 +113,9 @@ export default { ...@@ -113,9 +113,9 @@ export default {
<slot v-if="showEmptyState" name="empty-state"> <slot v-if="showEmptyState" name="empty-state">
<gl-empty-state <gl-empty-state
:title="s__(`We've found no vulnerabilities`)" :title="__(`We've found no vulnerabilities`)"
:description=" :description="
s__( __(
`While it's rare to have no vulnerabilities, it can happen. In any event, we ask that you please double check your settings to make sure you've set up your dashboard correctly.`, `While it's rare to have no vulnerabilities, it can happen. In any event, we ask that you please double check your settings to make sure you've set up your dashboard correctly.`,
) )
" "
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
description: s__( description: s__(
'SecurityReports|Manage and track vulnerabilities identified in your selected projects. Vulnerabilities for selected projects with security testing configured are shown here.', 'SecurityReports|Manage and track vulnerabilities identified in your selected projects. Vulnerabilities for selected projects with security testing configured are shown here.',
), ),
primaryButtonText: s__('Add projects'), primaryButtonText: __('Add projects'),
secondaryButtonText: __('Learn more'), secondaryButtonText: __('Learn more'),
}, },
}; };
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import { healthStatusTextMap, I18N_DROPDOWN } from '../../constants'; import { healthStatusTextMap, I18N_DROPDOWN } from '../../constants';
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
}, },
editTooltip() { editTooltip() {
const tooltipText = !this.isOpen const tooltipText = !this.isOpen
? s__('Health status cannot be edited because this issue is closed') ? __('Health status cannot be edited because this issue is closed')
: ''; : '';
return { return {
......
...@@ -60,7 +60,7 @@ export const I18N_DROPDOWN = { ...@@ -60,7 +60,7 @@ export const I18N_DROPDOWN = {
dropdownHeaderText: s__('Sidebar|Assign health status'), dropdownHeaderText: s__('Sidebar|Assign health status'),
noStatusText: s__('Sidebar|No status'), noStatusText: s__('Sidebar|No status'),
noneText: s__('Sidebar|None'), noneText: s__('Sidebar|None'),
selectPlaceholderText: s__('Select health status'), selectPlaceholderText: __('Select health status'),
}; };
export const CVE_ID_REQUEST_SIDEBAR_I18N = { export const CVE_ID_REQUEST_SIDEBAR_I18N = {
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
<gl-modal <gl-modal
:modal-id="modalId" :modal-id="modalId"
:ok-disabled="isApproving" :ok-disabled="isApproving"
:title="s__('Enter your password to approve')" :title="__('Enter your password to approve')"
ok-variant="success" ok-variant="success"
modal-class="js-mr-approvals-modal" modal-class="js-mr-approvals-modal"
@ok="approve" @ok="approve"
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
class="form-control" class="form-control"
:class="{ 'is-invalid': hasError }" :class="{ 'is-invalid': hasError }"
autocomplete="new-password" autocomplete="new-password"
:placeholder="s__('Password')" :placeholder="__('Password')"
/> />
</div> </div>
</div> </div>
...@@ -83,11 +83,11 @@ export default { ...@@ -83,11 +83,11 @@ export default {
</div> </div>
</form> </form>
<template #modal-cancel>{{ s__('Cancel') }}</template> <template #modal-cancel>{{ __('Cancel') }}</template>
<template #modal-ok> <template #modal-ok>
<gl-loading-icon v-if="isApproving" size="sm" inline /> <gl-loading-icon v-if="isApproving" size="sm" inline />
{{ s__('Approve') }} {{ __('Approve') }}
</template> </template>
</gl-modal> </gl-modal>
</template> </template>
import { n__, s__, sprintf } from '~/locale'; import { __, n__, s__, sprintf } from '~/locale';
import { LICENSE_APPROVAL_STATUS, REPORT_GROUPS } from '../constants'; import { LICENSE_APPROVAL_STATUS, REPORT_GROUPS } from '../constants';
import { addLicensesMatchingReportGroupStatus, reportGroupHasAtLeastOneLicense } from './utils'; import { addLicensesMatchingReportGroupStatus, reportGroupHasAtLeastOneLicense } from './utils';
...@@ -35,13 +35,13 @@ export const licenseReportLength = (_, getters) => { ...@@ -35,13 +35,13 @@ export const licenseReportLength = (_, getters) => {
export const licenseSummaryText = (state, getters) => { export const licenseSummaryText = (state, getters) => {
if (getters.isLoading) { if (getters.isLoading) {
return sprintf(s__('ciReport|Loading %{reportName} report'), { return sprintf(s__('ciReport|Loading %{reportName} report'), {
reportName: s__('License Compliance'), reportName: __('License Compliance'),
}); });
} }
if (state.loadLicenseReportError) { if (state.loadLicenseReportError) {
return sprintf(s__('ciReport|Failed to load %{reportName} report'), { return sprintf(s__('ciReport|Failed to load %{reportName} report'), {
reportName: s__('License Compliance'), reportName: __('License Compliance'),
}); });
} }
......
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
<vulnerability-detail v-if="crashState" :label="s__('Vulnerability|Crash state')"> <vulnerability-detail v-if="crashState" :label="s__('Vulnerability|Crash state')">
<span ref="crashState"> {{ crashState }} </span> <span ref="crashState"> {{ crashState }} </span>
</vulnerability-detail> </vulnerability-detail>
<vulnerability-detail v-if="stacktraceSnippet" :label="s__('Stacktrace snippet')"> <vulnerability-detail v-if="stacktraceSnippet" :label="__('Stacktrace snippet')">
<code-block ref="stacktraceSnippet" :code="stacktraceSnippet" max-height="225px" /> <code-block ref="stacktraceSnippet" :code="stacktraceSnippet" max-height="225px" />
</vulnerability-detail> </vulnerability-detail>
<vulnerability-detail v-if="identifiers" :label="s__('Vulnerability|Identifiers')"> <vulnerability-detail v-if="identifiers" :label="s__('Vulnerability|Identifiers')">
......
...@@ -22,7 +22,7 @@ export const i18n = { ...@@ -22,7 +22,7 @@ export const i18n = {
), ),
helpPageLinkLabel: s__('VulnerabilityManagement|Read more about related issues'), helpPageLinkLabel: s__('VulnerabilityManagement|Read more about related issues'),
createNewIssueLinkText: s__('VulnerabilityManagement|Create Jira issue'), createNewIssueLinkText: s__('VulnerabilityManagement|Create Jira issue'),
loadingStateLabel: s__('VulnerabilityManagement, Fetching linked Jira issues'), loadingStateLabel: s__('VulnerabilityManagement|Fetching linked Jira issues'),
}; };
export default { export default {
......
import { s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { import {
FEEDBACK_TYPE_ISSUE, FEEDBACK_TYPE_ISSUE,
FEEDBACK_TYPE_MERGE_REQUEST, FEEDBACK_TYPE_MERGE_REQUEST,
...@@ -17,7 +17,7 @@ export const VULNERABILITY_STATE_OBJECTS = { ...@@ -17,7 +17,7 @@ export const VULNERABILITY_STATE_OBJECTS = {
dismissed: { dismissed: {
action: 'dismiss', action: 'dismiss',
state: 'dismissed', state: 'dismissed',
displayName: s__('Dismiss'), displayName: __('Dismiss'),
description: falsePositiveMessage, description: falsePositiveMessage,
payload: { payload: {
comment: falsePositiveMessage, comment: falsePositiveMessage,
...@@ -26,13 +26,13 @@ export const VULNERABILITY_STATE_OBJECTS = { ...@@ -26,13 +26,13 @@ export const VULNERABILITY_STATE_OBJECTS = {
confirmed: { confirmed: {
action: 'confirm', action: 'confirm',
state: 'confirmed', state: 'confirmed',
displayName: s__('Confirm'), displayName: __('Confirm'),
description: s__('VulnerabilityManagement|A true-positive and will fix'), description: s__('VulnerabilityManagement|A true-positive and will fix'),
}, },
resolved: { resolved: {
action: 'resolve', action: 'resolve',
state: 'resolved', state: 'resolved',
displayName: s__('Resolve'), displayName: __('Resolve'),
description: s__('VulnerabilityManagement|Verified as fixed or mitigated'), description: s__('VulnerabilityManagement|Verified as fixed or mitigated'),
}, },
}; };
......
...@@ -38107,9 +38107,6 @@ msgstr "" ...@@ -38107,9 +38107,6 @@ msgstr ""
msgid "VulnerabilityChart|Severity" msgid "VulnerabilityChart|Severity"
msgstr "" msgstr ""
msgid "VulnerabilityManagement, Fetching linked Jira issues"
msgstr ""
msgid "VulnerabilityManagement|%{statusStart}Confirmed%{statusEnd} %{timeago} by %{user}" msgid "VulnerabilityManagement|%{statusStart}Confirmed%{statusEnd} %{timeago} by %{user}"
msgstr "" msgstr ""
...@@ -38137,6 +38134,9 @@ msgstr "" ...@@ -38137,6 +38134,9 @@ msgstr ""
msgid "VulnerabilityManagement|Detected" msgid "VulnerabilityManagement|Detected"
msgstr "" msgstr ""
msgid "VulnerabilityManagement|Fetching linked Jira issues"
msgstr ""
msgid "VulnerabilityManagement|Needs triage" msgid "VulnerabilityManagement|Needs triage"
msgstr "" msgstr ""
......
...@@ -185,15 +185,15 @@ describe('dateInWords', () => { ...@@ -185,15 +185,15 @@ describe('dateInWords', () => {
const date = new Date('07/01/2016'); const date = new Date('07/01/2016');
it('should return date in words', () => { it('should return date in words', () => {
expect(datetimeUtility.dateInWords(date)).toEqual(s__('July 1, 2016')); expect(datetimeUtility.dateInWords(date)).toEqual(__('July 1, 2016'));
}); });
it('should return abbreviated month name', () => { it('should return abbreviated month name', () => {
expect(datetimeUtility.dateInWords(date, true)).toEqual(s__('Jul 1, 2016')); expect(datetimeUtility.dateInWords(date, true)).toEqual(__('Jul 1, 2016'));
}); });
it('should return date in words without year', () => { it('should return date in words without year', () => {
expect(datetimeUtility.dateInWords(date, true, true)).toEqual(s__('Jul 1')); expect(datetimeUtility.dateInWords(date, true, true)).toEqual(__('Jul 1'));
}); });
}); });
...@@ -201,11 +201,11 @@ describe('monthInWords', () => { ...@@ -201,11 +201,11 @@ describe('monthInWords', () => {
const date = new Date('2017-01-20'); const date = new Date('2017-01-20');
it('returns month name from provided date', () => { it('returns month name from provided date', () => {
expect(datetimeUtility.monthInWords(date)).toBe(s__('January')); expect(datetimeUtility.monthInWords(date)).toBe(__('January'));
}); });
it('returns abbreviated month name from provided date', () => { it('returns abbreviated month name from provided date', () => {
expect(datetimeUtility.monthInWords(date, true)).toBe(s__('Jan')); expect(datetimeUtility.monthInWords(date, true)).toBe(__('Jan'));
}); });
}); });
......
...@@ -873,10 +873,10 @@ ...@@ -873,10 +873,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e" resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e"
integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg== integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg==
"@gitlab/eslint-plugin@9.4.0": "@gitlab/eslint-plugin@10.0.0":
version "9.4.0" version "10.0.0"
resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-9.4.0.tgz#cad8f63b7985c22865859cc7d2688eb446ad0bbb" resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-10.0.0.tgz#83430fb4d0a2467bb54975d0b5b9dc8016005722"
integrity sha512-llPypEQrm9/6Xas5GCoSPAK7W/DgO7CKhzDvAk/Ea9BP0rI2+t8Wg4PFhE1XDctYnnUIS/GrdqVKQkpODk24hQ== integrity sha512-frCYzjQQaZ5kW1on3XwuVGhvYa6XjD6Q1POTbxDpzl6tNxSeTwOJohC6Joyw76e0Kw4fPQd/fHAfKQAB0AVQ7A==
dependencies: dependencies:
babel-eslint "^10.0.3" babel-eslint "^10.0.3"
eslint-config-airbnb-base "^14.2.1" eslint-config-airbnb-base "^14.2.1"
......
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