Commit 74783231 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch '239367-use-i18n-object' into 'master'

Move the translations into an i18n object

See merge request gitlab-org/gitlab!46023
parents 0924b5fd 8b1273c4
<script>
import { mapActions, mapState } from 'vuex';
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale';
export default {
name: 'SecurityDashboardActionButtons',
......@@ -54,6 +55,12 @@ export default {
this.undoDismiss({ vulnerability, flashError: true });
},
},
i18n: {
moreInfo: s__('SecurityReports|More info'),
createIssue: s__('SecurityReports|Create issue'),
undoDismiss: s__('SecurityReports|Undo dismiss'),
dismissVulnerability: s__('SecurityReports|Dismiss vulnerability'),
},
};
</script>
......@@ -62,8 +69,8 @@ export default {
<gl-button
key="more-info"
v-gl-tooltip
:aria-label="s__('SecurityReports|More info')"
:title="s__('SecurityReports|More info')"
:aria-label="$options.i18n.moreInfo"
:title="$options.i18n.moreInfo"
class="js-more-info"
variant="info"
category="secondary"
......@@ -74,9 +81,9 @@ export default {
v-if="canCreateIssue"
key="create-issue"
v-gl-tooltip
:aria-label="s__('SecurityReports|Create issue')"
:aria-label="$options.i18n.createIssue"
:loading="isCreatingIssue"
:title="s__('SecurityReports|Create issue')"
:title="$options.i18n.createIssue"
class="js-create-issue"
variant="success"
category="secondary"
......@@ -88,9 +95,9 @@ export default {
v-if="isDismissed"
key="undo-dismiss"
v-gl-tooltip
:aria-label="s__('SecurityReports|Undo dismiss')"
:aria-label="$options.i18n.undoDismiss"
:loading="isDismissingVulnerability"
:title="s__('SecurityReports|Undo dismiss')"
:title="$options.i18n.undoDismiss"
class="js-undo-dismiss"
variant="warning"
category="secondary"
......@@ -101,9 +108,9 @@ export default {
v-else
key="dismiss-vulnerability"
v-gl-tooltip
:aria-label="s__('SecurityReports|Dismiss vulnerability')"
:aria-label="$options.i18n.dismissVulnerability"
:loading="isDismissingVulnerability"
:title="s__('SecurityReports|Dismiss vulnerability')"
:title="$options.i18n.dismissVulnerability"
class="js-dismiss-vulnerability"
variant="warning"
category="secondary"
......
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