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:
parent
8287f0c087
commit
ac5a14ffaf
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue