Translate the map legend's title, without inventing a word

Big Picture in Arabic still showed "UPGs / country" over its choropleth legend.
It is now composed from two catalogue entries that already ship in all eleven
locales — legend.columns.upgs and dashboard.country — so nothing new had to be
written in ten languages to fix it. The English shifts to "UUPGs / Country",
which is how this tree spells both words everywhere else.

It was the only one of the six remaining English strings on that view that
could be done this way. "Export CSV", "Full screen", the detail drawer's title
and empty state, and the legend's "heartbeat zone" bin all need wording that
does not exist yet, so they are on DECIDE-SR-CHROME-WITH-NO-CATALOGUE-WORDING
with one useful note: "Full screen" needs NO new wording either, because
buttons.toggleFullscreen already ships in every locale — only a decision to use
one toggle label instead of a two-state pair.

★ TWO OF THE REPORTED DEFECTS DO NOT REPRODUCE, and the measurement says why.
The table's last column header is neither English nor clipped on this tree: all
nine headers render Arabic and every one of them has scrollWidth equal to
clientWidth at 1440×900. The screenshot that reported "ent" predates the commit
that gave that column a catalogue getter.
This commit is contained in:
doxa-maps-88655c70 2026-09-25 19:27:29 +00:00
parent 5e7ad5a409
commit 588a2a5d3c
8 changed files with 85 additions and 73 deletions

View file

@ -11,6 +11,12 @@ import { useMapInstance } from '@map/composables/useMapInstance.js'
import { resolveMapProvider } from '@map/composables/useMapProvider.js'
import { useMapFly } from '@map/composables/useMapFly.js'
import { useShadowStyles } from '@map/composables/useShadowStyles.js'
import { tStatic } from '@map/i18n/index.js'
// This panel's chrome, read out of the catalogue. tStatic and not useI18n, for the reason the rest
// of this tree gives: these components mount inside custom elements that install no i18n plugin,
// and an unguarded useI18n() throws on the way in and takes the whole panel with it.
const T = (key, en) => tStatic(key) || en
// Table selection -> map camera. The table never touches the map: it commits to the bus,
// this composable watches bus.selectionVersion and flies ONCE per settled change.
import { useSelectionCamera } from '../../composables/useSelectionCamera.js'
@ -1674,7 +1680,13 @@ useShadowStyles(`
{{ projection === 'globe' ? '🌐 Globe' : '▭ Flat' }}
</span>
<div class="rd-legend-map" data-map-legend aria-label="UPG count legend">
<div class="lg-h">UPGs / country</div>
<!-- ★ COMPOSED FROM TWO EXISTING CATALOGUE ENTRIES, not from new wording. This legend title
was the last piece of English chrome here that could be translated without inventing a
phrase in ten languages: legend.columns.upgs and dashboard.country both already ship in
all eleven locales, and a slash-joined pair of them says exactly what the column is. The
English shifts from "UPGs / country" to "UUPGs / Country", which is the tree's own
spelling of both words everywhere else. -->
<div class="lg-h">{{ T('legend.columns.upgs', 'UUPGs') }} / {{ T('dashboard.country', 'Country') }}</div>
<div v-for="b in LEGEND_BINS" :key="b.l" class="lg-row">
<span class="lg-sw" :style="{ background: b.c }"></span><span>{{ b.l }}</span>
</div>

File diff suppressed because one or more lines are too long

View file

@ -40,7 +40,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
<script src="../../dashboard-plus-grid.js" integrity="sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx" crossorigin="anonymous"></script>
<script src="../../dashboard-plus-grid.js" integrity="sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -40,7 +40,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
<script src="../dashboard-plus-grid.js" integrity="sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx" crossorigin="anonymous"></script>
<script src="../dashboard-plus-grid.js" integrity="sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -215,7 +215,7 @@
"bundle": "dashboard-plus-grid",
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"output": "doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js",
"integrity": "sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx",
"integrity": "sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI",
"elements": [
"dashboard-plus-grid"
],
@ -235,7 +235,7 @@
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"embed": {
"iframe": "<iframe src=\"./dashboard-plus-grid/dashboard-plus-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
},
"instances": [
{
@ -945,7 +945,7 @@
"bundle": "research-dashboard",
"scriptUrl": "./research-dashboard/research-dashboard.js",
"output": "doxa-maps/research-dashboard/research-dashboard.js",
"integrity": "sha384-F3ljYXZ5AQO1d786TPiS4j3ZBqmJXvaQq0ZEMeBGWY68o36fs2RSOKa8Nf5b/Ecr",
"integrity": "sha384-qK1PN2fAOJTjGIIC7QDJwXPVhkVCmxwHn+ZCXj+q+ZIIODMZLtKw3H9XJN/Lojo8",
"elements": [
"research-dashboard-map"
],
@ -961,7 +961,7 @@
"scriptUrl": "./research-dashboard/research-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./research-dashboard/research-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-F3ljYXZ5AQO1d786TPiS4j3ZBqmJXvaQq0ZEMeBGWY68o36fs2RSOKa8Nf5b/Ecr\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-qK1PN2fAOJTjGIIC7QDJwXPVhkVCmxwHn+ZCXj+q+ZIIODMZLtKw3H9XJN/Lojo8\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
},
"bundle": "research-dashboard"
}

View file

@ -215,7 +215,7 @@
"bundle": "dashboard-plus-grid",
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"output": "doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js",
"integrity": "sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx",
"integrity": "sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI",
"elements": [
"dashboard-plus-grid"
],
@ -235,7 +235,7 @@
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"embed": {
"iframe": "<iframe src=\"./dashboard-plus-grid/dashboard-plus-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-iclm43YTiS1y0njp4o5+Du8pb/muPTg9RHbamNlcICNHzI9SvGrTQXLa//VCM9Kx\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-M+nPY+1WzefMhIq54auKwiQhJZ/xjidDNPmz0vBtQGw7GpV1KMdW0aaAEgVyw3aI\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
},
"instances": [
{
@ -945,7 +945,7 @@
"bundle": "research-dashboard",
"scriptUrl": "./research-dashboard/research-dashboard.js",
"output": "doxa-maps/research-dashboard/research-dashboard.js",
"integrity": "sha384-F3ljYXZ5AQO1d786TPiS4j3ZBqmJXvaQq0ZEMeBGWY68o36fs2RSOKa8Nf5b/Ecr",
"integrity": "sha384-qK1PN2fAOJTjGIIC7QDJwXPVhkVCmxwHn+ZCXj+q+ZIIODMZLtKw3H9XJN/Lojo8",
"elements": [
"research-dashboard-map"
],
@ -961,7 +961,7 @@
"scriptUrl": "./research-dashboard/research-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./research-dashboard/research-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-F3ljYXZ5AQO1d786TPiS4j3ZBqmJXvaQq0ZEMeBGWY68o36fs2RSOKa8Nf5b/Ecr\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-qK1PN2fAOJTjGIIC7QDJwXPVhkVCmxwHn+ZCXj+q+ZIIODMZLtKw3H9XJN/Lojo8\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
},
"bundle": "research-dashboard"
}

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <research-dashboard-map> custom element. -->
<script src="../research-dashboard.js" integrity="sha384-F3ljYXZ5AQO1d786TPiS4j3ZBqmJXvaQq0ZEMeBGWY68o36fs2RSOKa8Nf5b/Ecr" crossorigin="anonymous"></script>
<script src="../research-dashboard.js" integrity="sha384-qK1PN2fAOJTjGIIC7QDJwXPVhkVCmxwHn+ZCXj+q+ZIIODMZLtKw3H9XJN/Lojo8" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order: