diff --git a/library/components/hints/PinHint.vue b/library/components/hints/PinHint.vue index c9aed4cce..21ac64127 100644 --- a/library/components/hints/PinHint.vue +++ b/library/components/hints/PinHint.vue @@ -38,8 +38,10 @@ * dropped from the custom element's shadow DOM (see WARNING.md). */ import { ref, inject, computed, onMounted, onBeforeUnmount, getCurrentInstance, nextTick } from 'vue' +import { useI18n } from 'vue-i18n' import { useShadowStyles } from '../../composables/useShadowStyles.js' +const { t, te } = useI18n() const uiStore = inject('uiStore', null) const profileConfig = inject('profileConfig', null) const isDark = computed(() => uiStore?.theme === 'dark') @@ -54,8 +56,21 @@ const isDark = computed(() => uiStore?.theme === 'dark') // The fix is the DEFAULT, not per-profile config, because the defect came from a default that // asserted more than it could know. A shared component cannot know what colour a given map's dots // are, so it must not claim one; profiles that DO want to name a colour still can, via pinHintLabel. -const label = computed(() => - profileConfig?.value?.pinHintLabel || 'Tap a coloured dot — someone still needs prayer') +// ★ AND IT WAS NEVER TRANSLATED — on ANY map, in ANY locale. The colour half of this defect was +// found and fixed (the default no longer says "red"), and the note above records that carefully. +// What nobody checked is that the sentence is a JAVASCRIPT STRING LITERAL: this component has no +// useI18n, and no locale file anywhere carries the text. A reader in Arabic, Russian or Chinese +// has been shown an English sentence on every map that renders the hint. That is the same shape as +// the Russian-heading bug next door — wrong only for readers who do not file bug reports in +// English, and therefore invisible to everyone who could. +// The key falls back to the English sentence when a locale lacks it, so a missing translation +// degrades to today's behaviour rather than to "messages.pinHint.tapDot". +const label = computed(() => { + const override = profileConfig?.value?.pinHintLabel + if (override) return override + const EN = 'Tap a coloured dot — someone still needs prayer' + try { return te('messages.pinHint.tapDot') ? t('messages.pinHint.tapDot') : EN } catch (_) { return EN } +}) const visible = ref(false) const hintEl = ref(null) diff --git a/library/components/legends/SemanticTreeLegend.vue b/library/components/legends/SemanticTreeLegend.vue index 2673189fb..30e45c091 100644 --- a/library/components/legends/SemanticTreeLegend.vue +++ b/library/components/legends/SemanticTreeLegend.vue @@ -1225,8 +1225,19 @@ useShadowStyles(` @click="selectNode(row.node)"> +