diff --git a/plugin-designs/key-cities/cities-list.vue b/plugin-designs/key-cities/cities-list.vue index 7c0084ea4..71fb7674c 100644 --- a/plugin-designs/key-cities/cities-list.vue +++ b/plugin-designs/key-cities/cities-list.vue @@ -29,6 +29,7 @@ import { computed, inject, ref, onMounted, h } from 'vue' import { useI18n } from 'vue-i18n' import { sentenceParts, keep, ltr } from '@map/composables/useSentence.js' +import { regionLabel } from './regionLabel.js' import { useShadowStyles } from '@map/composables/useShadowStyles.js' import { resolveAssetsBase } from '@map/utils/embedBase.js' @@ -70,7 +71,10 @@ const shown = computed(() => { const sections = computed(() => { const by = new Map() for (const r of shown.value) { - const k = r.region || t('keyCities.posters.otherRegion') // a row with no region: a translated heading, not 'Other' + // The RAW data value is the key (sections, :key, collapse state); only the heading is translated, + // at render (secLabel below). 'Other' is a data guard for a row with no region: the sentinel + // dashboard.other projects. No row has an empty region today; "Other" and "N/A" are region values. + const k = r.region || 'Other' if (!by.has(k)) by.set(k, []) by.get(k).push(r) } @@ -87,6 +91,7 @@ const collapsed = ref({}) const isShut = (n) => !!collapsed.value[n] const toggle = (n) => { collapsed.value = { ...collapsed.value, [n]: !collapsed.value[n] } } const fmt = (n) => (Number(n) || 0).toLocaleString() +const secLabel = (name) => regionLabel(t, name) // ONE key for the caveat's sentence: the count and the gazetteer's name go in as values, the name as // its own left-to-right island (it is a proper name, never translated), so each language orders it. const caveatRow = computed(() => h('span', sentenceParts( @@ -156,7 +161,7 @@ const band = (a) => a === 'yes' ? 'ok' : a === 'partial' ? 'mid' : a === 'no' ?