diff --git a/plugin-designs/gospel-resources/data-tables.vue b/plugin-designs/gospel-resources/data-tables.vue index 0a197272f..529a68f49 100644 --- a/plugin-designs/gospel-resources/data-tables.vue +++ b/plugin-designs/gospel-resources/data-tables.vue @@ -217,8 +217,18 @@ const table = computed(() => { return out }) } + /* ⚠ TWO PATHS, AND THE FIRST VERSION OF THIS FIX ONLY TOOK THE SECOND. The unfiltered table + returns through localise() and the filtered one builds its own object; I added the title + lookup to the filtered path and measured the bug on an UNFILTERED table, which would have + shipped a fix for the state a reader is rarely in. One resolver, called from both. */ + const localTitle = (tbl) => { + const id = current.value?.id + const v = id ? tr('gospel.tableTitles.' + id) : '' + return v && !v.startsWith('gospel.tableTitles.') ? v : tbl?.meta?.title + } const localise = (tbl) => ({ ...tbl, + meta: { ...tbl.meta, title: localTitle(tbl) }, columns: (tbl.columns || []).map((c) => { const k = 'gospel.columns.' + String(c.title || '') const v = tr(k) @@ -252,8 +262,19 @@ const table = computed(() => { * already made — that component has other consumers and none of them need this — and it * fixes the on-screen heading in the same move: it read "every link, and who it reaches" * over a table showing one country's. */ - const title = t.meta?.title - ? `${t.meta.title} — ${fLabel.value || fProvince.value || fIso.value || fCountry.value}` + /* ═══ AND THE TITLE ITSELF WAS NEVER LOCALISED ════════════════════════════════════════ + * Measured at ?lang=ar: the tabs render in Arabic and then the heading above the table reads + * "Gospel Resources — every link, and who it reaches" in English, over English column headers. + * The headers have had a lookup since cell E; the TITLE had none at all, so it came straight + * out of the data file in every locale. + * + * Keyed by the tab's ID rather than by its English text, unlike the columns: a title is a + * sentence, and keying 'gospel.tableTitles.Gospel Resources — every link, and who it reaches' + * would break the day a builder rewords its own meta. The English stays the fallback, so this + * renders exactly what it renders today until each key lands. */ + const base = localTitle(t) + const title = base + ? `${base} — ${fLabel.value || fProvince.value || fIso.value || fCountry.value}` : t.meta?.title /* ═══ COLUMN HEADERS ARE CHROME, BUT THEY LIVE IN THE DATA FILE ══════════════════════ * A reader navigates a table by its headers, so they are UI strings by any fair reading of diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index 600b19c05..c77aa882e 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -578,7 +578,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-4Sf2kC/v3ea3FRq5yUtn2m6hW1rZm4gUwFeIIqC6CF6l+qX+MXco1hyFBUMpXptX", + "integrity": "sha384-7bXT35Wklzad+EJeByRsk34U31j7BDszlhNbnFDYCv1kXWKG4RIL1NGcrWOAT4tH", "elements": [ "gospel-resources-map" ], @@ -598,7 +598,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -612,7 +612,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -626,7 +626,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -640,7 +640,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -654,7 +654,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ] diff --git a/public/dx-maps/gospel-resources/charts/index.html b/public/dx-maps/gospel-resources/charts/index.html index 2d55b1fc1..e8558e0a9 100644 --- a/public/dx-maps/gospel-resources/charts/index.html +++ b/public/dx-maps/gospel-resources/charts/index.html @@ -32,7 +32,7 @@ - + - + - + - + - + \n\n" + "script": "\n\n" } }, { @@ -612,7 +612,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -626,7 +626,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -640,7 +640,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -654,7 +654,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ]