diff --git a/library/components/hints/PinHint.vue b/library/components/hints/PinHint.vue index fa7e108fa..917a93aa8 100644 --- a/library/components/hints/PinHint.vue +++ b/library/components/hints/PinHint.vue @@ -38,6 +38,12 @@ * dropped from the custom element's shadow DOM (see WARNING.md). */ import { ref, inject, computed, onMounted, onBeforeUnmount, getCurrentInstance, nextTick } from 'vue' +import { tStatic } from '@map/i18n/index.js' + +// This component's chrome, read out of the catalogue. tStatic and not useI18n: these mount inside +// custom elements that install no i18n plugin, and an unguarded useI18n() throws on the way in and +// takes the subtree with it. The English stays as the fallback. +const T = (key, en) => tStatic(key) || en import { useI18n } from 'vue-i18n' import { useShadowStyles } from '../../composables/useShadowStyles.js' @@ -374,7 +380,7 @@ useShadowStyles(` {{ label }} - + diff --git a/library/components/legends/LegendDesktop.vue b/library/components/legends/LegendDesktop.vue index c04eb188e..ab0c7ef75 100644 --- a/library/components/legends/LegendDesktop.vue +++ b/library/components/legends/LegendDesktop.vue @@ -1,5 +1,11 @@