Commit 088004a9 authored by Illya Klymov's avatar Illya Klymov

Merge branch...

Merge branch '241949-remove-v-html-from-ee-app-assets-javascripts-geo_replicable-components' into 'master'

Replace v-html with gl-sprintf in ee/app/assets/javascripts/geo_replicable/components/geo_replicable_empty_state.vue

Closes #241949

See merge request gitlab-org/gitlab!41488
parents 015d5d98 d30bbd50
<script> <script>
/* eslint-disable vue/no-v-html */
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { GlEmptyState } from '@gitlab/ui'; import { GlEmptyState } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
export default { export default {
name: 'GeoReplicableEmptyState', name: 'GeoReplicableEmptyState',
...@@ -21,18 +19,6 @@ export default { ...@@ -21,18 +19,6 @@ export default {
}, },
computed: { computed: {
...mapGetters(['replicableTypeName']), ...mapGetters(['replicableTypeName']),
linkText() {
return sprintf(
s__(
'Geo|Adjust your filters/search criteria above. If you believe this may be an error, please refer to the %{linkStart}Geo Troubleshooting%{linkEnd} documentation for more information.',
),
{
linkStart: `<a href="${this.geoTroubleshootingLink}" target="_blank">`,
linkEnd: '</a>',
},
false,
);
},
}, },
}; };
</script> </script>
...@@ -43,9 +29,19 @@ export default { ...@@ -43,9 +29,19 @@ export default {
:svg-path="geoReplicableEmptySvgPath" :svg-path="geoReplicableEmptySvgPath"
> >
<template #description> <template #description>
<div> <p>
<p v-html="linkText"></p> <gl-sprintf
</div> :message="
s__(
'Geo|Adjust your filters/search criteria above. If you believe this may be an error, please refer to the %{linkStart}Geo Troubleshooting%{linkEnd} documentation for more information.',
)
"
>
<template #link="{ content }">
<gl-link :href="geoTroubleshootingLink" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</p>
</template> </template>
</gl-empty-state> </gl-empty-state>
</template> </template>
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