Commit 8b1273c4 authored by Savas Vedova's avatar Savas Vedova

Move the translations into an i18n object

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