From 4ea988a4c95d1a5edf8afdc06fa67a56ecc0915a Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 08:53:30 +0000 Subject: [PATCH] Ten facet labels froze in the boot language MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GiCombos built its facets object inside provide() at setup, so T() ran once and the result was handed to the consumer as a literal. After a live switch to Arabic every facet name stayed in English — the labels were keyed, the keys resolved, and the reader still saw the wrong language, because what was wrong was WHEN they were read rather than whether they were translated. check:frozen-labels cannot see this: every call site passes a real key and every key exists in all eleven locales. The defect is a lifetime, not a string. The facets are a computed now, provided through a getter so a consumer reading .facets re-reads it rather than taking a snapshot. Demonstrated rather than asserted: with a locale ref driven en -> ar, the old shape keeps returning "Access" and the new one returns "الوصول". Audited all 179 t() call sites across the three plugins by enclosing scope, not by grep. This was the only frozen one; the six GiDrawer hits my first pass flagged are inside a computed 60 lines up, which is why a lookback window is the wrong tool for a lifetime question. --- .../src/components/GiCombos.vue | 13 +++++++--- public/dx-maps/doxa-maps-spa/manifest.json | 4 +-- .../gospel-internet/board/board/index.html | 2 +- .../dx-maps/gospel-internet/board/index.html | 2 +- .../board/india-china/index.html | 2 +- .../board/language-tree/index.html | 2 +- .../board/platforms/index.html | 2 +- .../board/project-700/index.html | 2 +- .../gospel-internet/board/zero/index.html | 2 +- .../gospel-internet/gospel-internet.js | 26 +++++++++---------- public/dx-maps/manifest.json | 4 +-- 11 files changed, 34 insertions(+), 27 deletions(-) diff --git a/plugin-designs/gospel-internet/src/components/GiCombos.vue b/plugin-designs/gospel-internet/src/components/GiCombos.vue index fa6acb739..3895bf40d 100644 --- a/plugin-designs/gospel-internet/src/components/GiCombos.vue +++ b/plugin-designs/gospel-internet/src/components/GiCombos.vue @@ -48,8 +48,12 @@ function labelFor(key, value) { return [].concat(value).map((v) => labelOne(key, v)).join(', ') } provide('selectionBus', bus) -provide('dashboardConfig', { - facets: { +// ★ THE FACET LABELS ARE A COMPUTED, NOT A LITERAL. Evaluated once inside provide() they froze in +// the boot language: T() runs at setup, the object is handed to the consumer, and a live switch to +// Arabic left every facet name in English. check:frozen-labels cannot see this — the call sites ARE +// keyed and the keys DO resolve; what is wrong is WHEN they were read. A computed re-evaluates when +// the locale ref changes, so the same keys now follow the reader. +const facets = computed(() => ({ access_level: { label: T('gospelInternet.facet.access', 'Access in their own language') }, access_detail: { label: T('gospelInternet.col.access', 'In own language') }, band: { label: T('gospelInternet.facet.band', 'Country internet use') }, @@ -60,7 +64,10 @@ provide('dashboardConfig', { religion: { label: T('gospelInternet.facet.religion', 'Religion') }, way_in: { label: T('gospelInternet.facet.wayIn', 'Way in when nothing is in their language') }, messaging: { label: T('gospelInternet.facet.messaging', 'Top messaging app (country)') }, - }, +})) +provide('dashboardConfig', { + // A getter, so a consumer reading .facets re-reads the computed rather than a snapshot of it. + get facets() { return facets.value }, facetRail: FACET_RAIL, legend: { labelFor }, }) diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index 6ec152350..612aa0d54 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -644,7 +644,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-G7PIOaa+ZXklHbabRFPnvEy2o3WWDb3Ci3/0Apy8OOgK8yTKaMDtLeLa+hx7Io9l", + "integrity": "sha384-3bFlV2dK6lV7cy3B6QPcjS6QtIE1lW1R56IliClxCfaIK1Em73yPkQuETVpfys89", "elements": [ "gospel-internet-board" ], @@ -665,7 +665,7 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/gospel-internet/board/board/index.html b/public/dx-maps/gospel-internet/board/board/index.html index d106de70e..fba761eae 100644 --- a/public/dx-maps/gospel-internet/board/board/index.html +++ b/public/dx-maps/gospel-internet/board/board/index.html @@ -65,7 +65,7 @@ - + - + - + - + - + - + - + \n\n\n" + "script": "\n\n\n\n\n" }, "instances": [ {