Commit 61c0dbe4 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '336503-add-target-tooltip-corpus-management' into 'master'

Add tooltip to No Target text in corpus management

See merge request gitlab-org/gitlab!67345
parents d6c18665 736e7a6d
<script>
import { GlIcon } from '@gitlab/ui';
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale';
export default {
components: {
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
target: {
type: String,
......@@ -14,6 +17,7 @@ export default {
},
i18n: {
notSet: s__('CorpusManagement|Not Set'),
noSetInfo: s__('CorpusManagement|To use this corpus, edit the corresponding YAML file'),
},
computed: {
hasTarget() {
......@@ -24,7 +28,7 @@ export default {
</script>
<template>
<span v-if="hasTarget" class="gl-text-gray-900"> {{ target }} </span>
<span v-else class="gl-text-gray-900">
<span v-else v-gl-tooltip.hover class="gl-text-gray-900" :title="$options.i18n.noSetInfo">
<gl-icon class="gl-mr-1" :size="16" name="information-o" />
{{ this.$options.i18n.notSet }}
</span>
......
......@@ -11,6 +11,7 @@ exports[`Target component renders target 1`] = `
exports[`Target component without target renders Not Set with icon 1`] = `
<span
class="gl-text-gray-900"
title="To use this corpus, edit the corresponding YAML file"
>
<gl-icon-stub
class="gl-mr-1"
......
......@@ -9196,6 +9196,9 @@ msgstr ""
msgid "CorpusManagement|Target"
msgstr ""
msgid "CorpusManagement|To use this corpus, edit the corresponding YAML file"
msgstr ""
msgid "CorpusManagement|Total Size: %{totalSize}"
msgstr ""
......
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