The UPG-100 map's first status re-resolves on a language switch: it was set once at setup, which check:frozen-labels refuses

This commit is contained in:
Doxa Maps 2026-09-29 08:39:07 +00:00
parent 8287f0c087
commit ac5a14ffaf

View file

@ -414,7 +414,12 @@ const API_BASE = (typeof window !== 'undefined' && window.MAP_APP_API_URL)
// so the dialog opens in this tab rather than a popup a browser may block. The
// packet's locale follows the app's, so a reader gets it in their own language.
const { locale: packetLocale, t } = useI18n()
status.value = t('legend.loadingData')
// The first status a reader sees. Set in a watcher, not once at setup, so a language switch while the
// map is still loading re-resolves it; the first real status replaces it and the watcher then leaves it.
let loadingText = ''
watch(packetLocale, () => {
if (status.value === '' || status.value === loadingText) status.value = loadingText = t('legend.loadingData')
}, { immediate: true })
// ★ THE LEGEND SPEAKS THE READER'S LANGUAGE. Its rows were clusters.json's English labels and its
// section rows the English grouping keys, while the packet printed from the same row was localized