From 9e52b82bd72b0b8179ccadf08e72684ab319728d Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 01:16:23 +0000 Subject: [PATCH] Cities list + tables: keep numbers in their previous format while numerals are held 922a8b66 formatted counts with toLocaleString(), which switches Arabic to Arabic-Indic digits. Numerals are held for the Driver (dx-shepherd, 2026-09-26), so num() goes back to the browser-default toLocaleString() these views used before. Only the text is translated. The bundle builds. --- plugin-designs/cities-internet/connectivity-list.vue | 8 ++++---- plugin-designs/cities-internet/data-tables.vue | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin-designs/cities-internet/connectivity-list.vue b/plugin-designs/cities-internet/connectivity-list.vue index 199824f54..d16ef19ca 100644 --- a/plugin-designs/cities-internet/connectivity-list.vue +++ b/plugin-designs/cities-internet/connectivity-list.vue @@ -46,14 +46,14 @@ const enLookup = (key) => String(key).replace(/^connectivity\./, '').split('.').reduce((o, k) => (o == null ? o : o[k]), enConnectivity) const fill = (str, params) => (params ? String(str).replace(/\{(\w+)\}/g, (m, k) => (k in params ? params[k] : m)) : str) let t = (key, params) => fill(enLookup(key) ?? String(key), params) -let uiLocale = () => undefined try { const i18n = useI18n() t = (key, params) => { const v = i18n.t(key, params || {}); return v === key ? fill(enLookup(key) ?? key, params) : v } - uiLocale = () => i18n.locale.value } catch (_) { /* no i18n on this host: the English catalog above is the fallback */ } -// Numbers in the reader's locale, not the browser's (a bare toLocaleString() used the browser's). -const num = (n) => (Number(n) || 0).toLocaleString(uiLocale()) +// NUMERALS ARE HELD for the Driver (dx-shepherd, 2026-09-26): a locale-following format would switch +// 'ar' to Arabic-Indic digits. Until that is decided, numbers keep the browser-default format they +// had before this pass; only the TEXT is translated. +const num = (n) => (Number(n) || 0).toLocaleString() const isDark = computed(() => profileConfig.value?.isDark === true) const countries = computed(() => data.countries || []) diff --git a/plugin-designs/cities-internet/data-tables.vue b/plugin-designs/cities-internet/data-tables.vue index f03b4eb48..fd1265b3d 100644 --- a/plugin-designs/cities-internet/data-tables.vue +++ b/plugin-designs/cities-internet/data-tables.vue @@ -40,14 +40,14 @@ const enLookup = (key) => String(key).replace(/^connectivity\./, '').split('.').reduce((o, k) => (o == null ? o : o[k]), enConnectivity) const fill = (str, params) => (params ? String(str).replace(/\{(\w+)\}/g, (m, k) => (k in params ? params[k] : m)) : str) let t = (key, params) => fill(enLookup(key) ?? String(key), params) -let uiLocale = () => undefined try { const i18n = useI18n() t = (key, params) => { const v = i18n.t(key, params || {}); return v === key ? fill(enLookup(key) ?? key, params) : v } - uiLocale = () => i18n.locale.value } catch (_) { /* no i18n on this host: the English catalog above is the fallback */ } -// Numbers in the reader's locale, not the browser's (a bare toLocaleString() used the browser's). -const num = (n) => (Number(n) || 0).toLocaleString(uiLocale()) +// NUMERALS ARE HELD for the Driver (dx-shepherd, 2026-09-26): a locale-following format would switch +// 'ar' to Arabic-Indic digits. Until that is decided, numbers keep the browser-default format they +// had before this pass; only the TEXT is translated. +const num = (n) => (Number(n) || 0).toLocaleString() const TABS = [ { id: 'cities', label: 'Key Cities', file: 'key-cities' },