From 83fc3f502970a9a933f598f6cc2ad065712a5590 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 11:44:41 +0000 Subject: [PATCH] Share, export, clusters and the pin hint stop being typed in English MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Second of the shared-library batches, in the shepherd's order: ShareButton, DataTable, LegendTools, and PinHint's dismiss label. ★ THE ONE THAT MATTERS MOST IS THE PARAGRAPH A PARTNER READS. ShareButton's embed tab explains where to paste the snippet — "WordPress, Squarespace, Wix, or any site that accepts HTML widgets" — and it was English on every locale of a product whose whole pitch is that a partner can drop it into their own page. The two tab labels beside it likewise. Also wired: the data table's CSV and JSON buttons, its row-detail hint and dialog label; the legend's Clusters button and the Minimum Spanning Tree option with its explanation; and the pin hint's Dismiss. ★ SIX SITES NEEDED NO NEW WORDING AT ALL — they already had translations in all eleven locales and were still typed into the template: four "Close" buttons (buttons.close) across PosterDialog, DataTable, MapControlMenu and the QA corner, "Expand legend" (aria.expandLegend) and PosterWall's "people groups". Those are the cheapest defect in the whole catalogue: the work was done, the reader just never saw it. CSV and JSON are keyed but identical in all eleven, like DPI in the poster batch. A format acronym is not an untranslated string; the key exists so a language that does translate it can, without anyone editing a component. ★ LIBRARY CHANGE — studio's to land under rule 5B. I have NOT rebuilt anything. Until it lands, every string falls back to the English it reads today. Measured with the source audit: shared-library strings with no catalogue entry go 32 → 21, and the has-a-key-but-hardcoded class goes 6 → 2. Remaining, in order: QaCorner (10, a developer tool), SemanticTreeLegend (4), PosterPreview, PosterWall and VerticalTabsLayout (2 each). --- library/components/hints/PinHint.vue | 8 +++++++- library/components/legends/LegendDesktop.vue | 8 +++++++- library/components/legends/LegendTools.vue | 10 ++++++++-- .../components/map-controls/MapControlMenu.vue | 8 +++++++- library/components/map-controls/ShareButton.vue | 12 +++++++++--- library/components/poster/PosterDialog.vue | 2 +- library/components/tables/DataTable.vue | 16 +++++++++++----- library/i18n/locales/ar/aria.json | 4 +++- library/i18n/locales/ar/controls.json | 5 ++++- library/i18n/locales/ar/share.json | 5 +++++ library/i18n/locales/ar/tables.json | 5 +++++ library/i18n/locales/de/aria.json | 4 +++- library/i18n/locales/de/controls.json | 5 ++++- library/i18n/locales/de/share.json | 5 +++++ library/i18n/locales/de/tables.json | 5 +++++ library/i18n/locales/en/aria.json | 4 +++- library/i18n/locales/en/controls.json | 5 ++++- library/i18n/locales/en/share.json | 5 +++++ library/i18n/locales/en/tables.json | 5 +++++ library/i18n/locales/es/aria.json | 4 +++- library/i18n/locales/es/controls.json | 5 ++++- library/i18n/locales/es/share.json | 5 +++++ library/i18n/locales/es/tables.json | 5 +++++ library/i18n/locales/fr/aria.json | 4 +++- library/i18n/locales/fr/controls.json | 5 ++++- library/i18n/locales/fr/share.json | 5 +++++ library/i18n/locales/fr/tables.json | 5 +++++ library/i18n/locales/hi/aria.json | 4 +++- library/i18n/locales/hi/controls.json | 5 ++++- library/i18n/locales/hi/share.json | 5 +++++ library/i18n/locales/hi/tables.json | 5 +++++ library/i18n/locales/it/aria.json | 4 +++- library/i18n/locales/it/controls.json | 5 ++++- library/i18n/locales/it/share.json | 5 +++++ library/i18n/locales/it/tables.json | 5 +++++ library/i18n/locales/pt/aria.json | 4 +++- library/i18n/locales/pt/controls.json | 5 ++++- library/i18n/locales/pt/share.json | 5 +++++ library/i18n/locales/pt/tables.json | 5 +++++ library/i18n/locales/ro/aria.json | 4 +++- library/i18n/locales/ro/controls.json | 5 ++++- library/i18n/locales/ro/share.json | 5 +++++ library/i18n/locales/ro/tables.json | 5 +++++ library/i18n/locales/ru/aria.json | 4 +++- library/i18n/locales/ru/controls.json | 5 ++++- library/i18n/locales/ru/share.json | 5 +++++ library/i18n/locales/ru/tables.json | 5 +++++ library/i18n/locales/zh/aria.json | 4 +++- library/i18n/locales/zh/controls.json | 5 ++++- library/i18n/locales/zh/share.json | 5 +++++ library/i18n/locales/zh/tables.json | 5 +++++ 51 files changed, 237 insertions(+), 36 deletions(-) create mode 100644 library/i18n/locales/ar/share.json create mode 100644 library/i18n/locales/ar/tables.json create mode 100644 library/i18n/locales/de/share.json create mode 100644 library/i18n/locales/de/tables.json create mode 100644 library/i18n/locales/en/share.json create mode 100644 library/i18n/locales/en/tables.json create mode 100644 library/i18n/locales/es/share.json create mode 100644 library/i18n/locales/es/tables.json create mode 100644 library/i18n/locales/fr/share.json create mode 100644 library/i18n/locales/fr/tables.json create mode 100644 library/i18n/locales/hi/share.json create mode 100644 library/i18n/locales/hi/tables.json create mode 100644 library/i18n/locales/it/share.json create mode 100644 library/i18n/locales/it/tables.json create mode 100644 library/i18n/locales/pt/share.json create mode 100644 library/i18n/locales/pt/tables.json create mode 100644 library/i18n/locales/ro/share.json create mode 100644 library/i18n/locales/ro/tables.json create mode 100644 library/i18n/locales/ru/share.json create mode 100644 library/i18n/locales/ru/tables.json create mode 100644 library/i18n/locales/zh/share.json create mode 100644 library/i18n/locales/zh/tables.json diff --git a/library/components/hints/PinHint.vue b/library/components/hints/PinHint.vue index fa7e108fa..917a93aa8 100644 --- a/library/components/hints/PinHint.vue +++ b/library/components/hints/PinHint.vue @@ -38,6 +38,12 @@ * dropped from the custom element's shadow DOM (see WARNING.md). */ import { ref, inject, computed, onMounted, onBeforeUnmount, getCurrentInstance, nextTick } from 'vue' +import { tStatic } from '@map/i18n/index.js' + +// This component's chrome, read out of the catalogue. tStatic and not useI18n: these mount inside +// custom elements that install no i18n plugin, and an unguarded useI18n() throws on the way in and +// takes the subtree with it. The English stays as the fallback. +const T = (key, en) => tStatic(key) || en import { useI18n } from 'vue-i18n' import { useShadowStyles } from '../../composables/useShadowStyles.js' @@ -374,7 +380,7 @@ useShadowStyles(` {{ label }} - + diff --git a/library/components/legends/LegendDesktop.vue b/library/components/legends/LegendDesktop.vue index c04eb188e..ab0c7ef75 100644 --- a/library/components/legends/LegendDesktop.vue +++ b/library/components/legends/LegendDesktop.vue @@ -1,5 +1,11 @@