From 922a8b66e7d4dd84aa240946fcd88d182e75c66a Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 00:06:03 +0000 Subject: [PATCH] Cities with Internet: the list and data-tables views speak the reader's language Both views were English-only with no t() (the universal-props matrix, cell L1): titles, intro, count chips, section and row lines, band pills, the source note, the five table tabs and the loading line. They now read connectivity.list.* and connectivity.tables.* in all 11 locales, with the English catalog as the fallback where no i18n is installed (the connectivity-map pattern), and format numbers in the reader's locale instead of the browser's. Count chips use a "label: N" form outside English so no language needs plural rules. Region and country names are data, unchanged. check:i18n-parity PASS; every new key's placeholders match English in every locale; the bundle builds. Touches library/i18n/locales (eagerly globbed into every i18n bundle), so studio lands it with the consumer rebuild (rule 5B). needs eyes: Cities with Internet > list and Cities Data tabs with ?lang=ar and ?lang=zh. --- library/i18n/locales/ar/connectivity.json | 33 ++++++++++++ library/i18n/locales/de/connectivity.json | 33 ++++++++++++ library/i18n/locales/en/connectivity.json | 33 ++++++++++++ library/i18n/locales/es/connectivity.json | 33 ++++++++++++ library/i18n/locales/fr/connectivity.json | 33 ++++++++++++ library/i18n/locales/hi/connectivity.json | 33 ++++++++++++ library/i18n/locales/it/connectivity.json | 33 ++++++++++++ library/i18n/locales/pt/connectivity.json | 33 ++++++++++++ library/i18n/locales/ro/connectivity.json | 33 ++++++++++++ library/i18n/locales/ru/connectivity.json | 33 ++++++++++++ library/i18n/locales/zh/connectivity.json | 33 ++++++++++++ .../cities-internet/connectivity-list.vue | 50 ++++++++++++------- .../cities-internet/data-tables.vue | 33 ++++++++---- 13 files changed, 418 insertions(+), 28 deletions(-) diff --git a/library/i18n/locales/ar/connectivity.json b/library/i18n/locales/ar/connectivity.json index 8efd2fb3f..bccff8fba 100644 --- a/library/i18n/locales/ar/connectivity.json +++ b/library/i18n/locales/ar/connectivity.json @@ -21,5 +21,38 @@ "carriers": "شركات الاتصالات ومزودو الإنترنت ({n})", "socialPlatforms": "منصات التواصل الاجتماعي", "note": "أرقام وطنية وليست قياسات للمدن. أسماء شركات الاتصالات هي أسماء أصحاب سجلات ASN — وتشمل البنوك والجامعات إلى جانب مزودي الإنترنت، لذا فإن تصنيفها كشركات اتصالات تقدير مبني على الاسم وليس تصنيفًا مُتحقَّقًا منه." + }, + "list": { + "title": "المدن المتصلة بالإنترنت", + "intro": "الاتصال حيث تعيش الشعوب غير المُبشَّرة. كل رقم إحصاء وطني مُقاس مع سنة رصده —", + "introStrong": "«غير معروف» يعني غير مُقاس، ولا يُفترض أبدًا.", + "countries": "الدول: {n}", + "measured": "مُقاسة: {n}", + "unknown": "غير معروفة: {n}", + "low": "اتصال منخفض: {n}", + "sectionMeta": "الدول: {countries} · الشعوب: {groups}", + "unmeasured": "غير مُقاسة: {n}", + "rowMeta": "الشعوب: {groups} · المواقع: {locations}", + "centres": "مراكز سكانية: {n}", + "mobPer100": "جوال/100", + "band": { + "yes": "متصل", + "partial": "جزئي", + "no": "منخفض", + "unknown": "غير معروف" + }, + "source": "أرقام الإنترنت والجوال: البيانات المفتوحة للبنك الدولي (CC BY 4.0)، أحدث رصد 2018–2024. الفئات: متصل ≥60% · جزئي 25–59% · منخفض <25% من السكان يستخدمون الإنترنت. الدقة على مستوى الدولة: قياسات كل مدينة غير متاحة للعموم بهذا النطاق. أسماء مزودي الإنترنت وشركات الاتصالات وتاريخ الرقابة تتطلب مصادر موثقة لكل دولة ولا تُعرض هنا." + }, + "tables": { + "title": "بيانات المدن", + "intro": "حيث تعيش الشعوب غير المُبشَّرة، وما الذي يصل إليها. رتّب أي جدول وصفّه وصدّره؛ لكل جدول مصادره وحدوده.", + "tabs": { + "cities": "المدن الرئيسية", + "internet": "الاتصال", + "operators": "مزودو الإنترنت والاتصالات", + "social": "المنصات الاجتماعية", + "messaging": "تطبيقات المراسلة" + }, + "loading": "جارٍ تحميل {name}…" } } diff --git a/library/i18n/locales/de/connectivity.json b/library/i18n/locales/de/connectivity.json index 4d43d1e4a..d982b5d8e 100644 --- a/library/i18n/locales/de/connectivity.json +++ b/library/i18n/locales/de/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Netzbetreiber & ISPs ({n})", "socialPlatforms": "Soziale Plattformen", "note": "Landesweite Zahlen, keine Messungen je Stadt. Betreibernamen sind ASN-Registerinhaber — darunter neben ISPs auch Banken und Universitäten; die Einstufung als Netzbetreiber ist daher eine Namensheuristik, keine geprüfte Klassifizierung." + }, + "list": { + "title": "Städte mit Internet", + "intro": "Konnektivität dort, wo die unerreichten Volksgruppen leben. Jede Zahl ist eine gemessene nationale Statistik mit ihrem Erhebungsjahr —", + "introStrong": "„unbekannt“ heißt ungemessen, nie angenommen.", + "countries": "Länder: {n}", + "measured": "gemessen: {n}", + "unknown": "unbekannt: {n}", + "low": "geringe Konnektivität: {n}", + "sectionMeta": "Länder: {countries} · Volksgruppen: {groups}", + "unmeasured": "ungemessen: {n}", + "rowMeta": "Volksgruppen: {groups} · Orte: {locations}", + "centres": "Bevölkerungszentren: {n}", + "mobPer100": "Mobil/100", + "band": { + "yes": "verbunden", + "partial": "teilweise", + "no": "gering", + "unknown": "unbekannt" + }, + "source": "Internet- und Mobilfunkzahlen: World Bank Open Data (CC BY 4.0), jüngste Erhebung 2018–2024. Einteilung: verbunden ≥60 % · teilweise 25–59 % · gering <25 % der Bevölkerung nutzen das Internet. Auflösung auf Länderebene: Messungen pro Stadt sind in diesem Umfang nicht öffentlich verfügbar. Namen von Internetanbietern und Netzbetreibern sowie Zensurgeschichte erfordern belegte Berichte je Land und werden nicht angezeigt." + }, + "tables": { + "title": "Städtedaten", + "intro": "Wo die unerreichten Volksgruppen leben – und was sie erreicht. Jede Tabelle lässt sich sortieren, filtern und exportieren; jede führt ihre eigenen Quellen und Grenzen.", + "tabs": { + "cities": "Schlüsselstädte", + "internet": "Konnektivität", + "operators": "Internetanbieter & Netzbetreiber", + "social": "Soziale Plattformen", + "messaging": "Messenger" + }, + "loading": "{name} wird geladen…" } } diff --git a/library/i18n/locales/en/connectivity.json b/library/i18n/locales/en/connectivity.json index af34df67e..52a3fa864 100644 --- a/library/i18n/locales/en/connectivity.json +++ b/library/i18n/locales/en/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Carriers & ISPs ({n})", "socialPlatforms": "Social platforms", "note": "National figures, not city measurements. Carrier names are ASN registry holders — that set includes banks and universities as well as ISPs, so the carrier flag is a name heuristic, not a verified classification." + }, + "list": { + "title": "Cities with Internet", + "intro": "Connectivity where the unengaged people groups live. Every figure is a measured national statistic with its observation year —", + "introStrong": "unknown means unmeasured, never assumed.", + "countries": "{n} countries", + "measured": "{n} measured", + "unknown": "{n} unknown", + "low": "{n} low-connectivity", + "sectionMeta": "{countries} countries · {groups} people groups", + "unmeasured": "{n} unmeasured", + "rowMeta": "{groups} people groups · {locations} locations", + "centres": "{n} population centres", + "mobPer100": "mob/100", + "band": { + "yes": "connected", + "partial": "partial", + "no": "low", + "unknown": "unknown" + }, + "source": "Internet and mobile figures: World Bank Open Data (CC BY 4.0), most recent observation 2018–2024. Banding: connected ≥60% · partial 25–59% · low <25% of population using the internet. Country-resolution: per-city measurements are not publicly available at this scale. ISP names, carrier names and censorship history require per-country cited reporting and are not shown." + }, + "tables": { + "title": "Cities Data", + "intro": "Where the unengaged people groups live, and what reaches them. Sort, filter and export any table; each carries its own sources and limits.", + "tabs": { + "cities": "Key Cities", + "internet": "Connectivity", + "operators": "ISPs & Carriers", + "social": "Social Platforms", + "messaging": "Messaging Apps" + }, + "loading": "Loading {name}…" } } diff --git a/library/i18n/locales/es/connectivity.json b/library/i18n/locales/es/connectivity.json index b164eeae4..10164c444 100644 --- a/library/i18n/locales/es/connectivity.json +++ b/library/i18n/locales/es/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Operadores y proveedores de internet ({n})", "socialPlatforms": "Redes sociales", "note": "Cifras nacionales, no mediciones por ciudad. Los nombres de operadores son titulares de registros ASN (incluyen bancos y universidades además de proveedores), así que la marca de operador es una heurística por nombre, no una clasificación verificada." + }, + "list": { + "title": "Ciudades con internet", + "intro": "Conectividad donde viven los pueblos no alcanzados. Cada cifra es una estadística nacional medida, con su año de observación —", + "introStrong": "«desconocido» significa no medido, nunca supuesto.", + "countries": "países: {n}", + "measured": "medidos: {n}", + "unknown": "desconocidos: {n}", + "low": "baja conectividad: {n}", + "sectionMeta": "países: {countries} · pueblos: {groups}", + "unmeasured": "sin medir: {n}", + "rowMeta": "pueblos: {groups} · lugares: {locations}", + "centres": "centros de población: {n}", + "mobPer100": "móv./100", + "band": { + "yes": "conectado", + "partial": "parcial", + "no": "baja", + "unknown": "desconocido" + }, + "source": "Cifras de internet y móvil: Datos Abiertos del Banco Mundial (CC BY 4.0), observación más reciente 2018–2024. Rangos: conectado ≥60 % · parcial 25–59 % · baja <25 % de la población usa internet. Resolución por país: no hay mediciones públicas por ciudad a esta escala. Los nombres de proveedores y operadores y el historial de censura requieren informes citados por país y no se muestran." + }, + "tables": { + "title": "Datos de ciudades", + "intro": "Dónde viven los pueblos no alcanzados, y qué les llega. Ordena, filtra y exporta cualquier tabla; cada una indica sus fuentes y límites.", + "tabs": { + "cities": "Ciudades clave", + "internet": "Conectividad", + "operators": "Proveedores y operadores", + "social": "Redes sociales", + "messaging": "Mensajería" + }, + "loading": "Cargando {name}…" } } diff --git a/library/i18n/locales/fr/connectivity.json b/library/i18n/locales/fr/connectivity.json index 25787e05e..902c2581c 100644 --- a/library/i18n/locales/fr/connectivity.json +++ b/library/i18n/locales/fr/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Opérateurs et FAI ({n})", "socialPlatforms": "Réseaux sociaux", "note": "Chiffres nationaux, pas des mesures par ville. Les noms d'opérateurs sont les titulaires de registres ASN (on y trouve aussi des banques et des universités à côté des FAI), donc l'étiquette « opérateur » est une heuristique fondée sur le nom, non une classification vérifiée." + }, + "list": { + "title": "Villes connectées à Internet", + "intro": "La connectivité là où vivent les peuples non atteints. Chaque chiffre est une statistique nationale mesurée, avec son année d’observation —", + "introStrong": "« inconnu » signifie non mesuré, jamais supposé.", + "countries": "pays : {n}", + "measured": "mesurés : {n}", + "unknown": "inconnus : {n}", + "low": "faible connectivité : {n}", + "sectionMeta": "pays : {countries} · peuples : {groups}", + "unmeasured": "non mesurés : {n}", + "rowMeta": "peuples : {groups} · lieux : {locations}", + "centres": "centres de population : {n}", + "mobPer100": "mob./100", + "band": { + "yes": "connecté", + "partial": "partiel", + "no": "faible", + "unknown": "inconnu" + }, + "source": "Chiffres Internet et mobile : Données ouvertes de la Banque mondiale (CC BY 4.0), observation la plus récente 2018–2024. Tranches : connecté ≥60 % · partiel 25–59 % · faible <25 % de la population utilise Internet. Résolution par pays : aucune mesure publique par ville à cette échelle. Les noms des fournisseurs et opérateurs et l’historique de censure exigent des sources citées par pays et ne sont pas affichés." + }, + "tables": { + "title": "Données des villes", + "intro": "Où vivent les peuples non atteints, et ce qui leur parvient. Triez, filtrez et exportez chaque tableau ; chacun indique ses sources et ses limites.", + "tabs": { + "cities": "Villes clés", + "internet": "Connectivité", + "operators": "FAI et opérateurs", + "social": "Réseaux sociaux", + "messaging": "Messageries" + }, + "loading": "Chargement de {name}…" } } diff --git a/library/i18n/locales/hi/connectivity.json b/library/i18n/locales/hi/connectivity.json index 566b6078d..dbf1e206f 100644 --- a/library/i18n/locales/hi/connectivity.json +++ b/library/i18n/locales/hi/connectivity.json @@ -21,5 +21,38 @@ "carriers": "कैरियर और आईएसपी ({n})", "socialPlatforms": "सोशल प्लेटफ़ॉर्म", "note": "ये राष्ट्रीय आँकड़े हैं, शहरों के माप नहीं। कैरियर के नाम ASN रजिस्ट्री धारकों के हैं — उनमें आईएसपी के साथ बैंक और विश्वविद्यालय भी शामिल हैं, इसलिए कैरियर का चिह्न नाम पर आधारित अनुमान है, सत्यापित वर्गीकरण नहीं।" + }, + "list": { + "title": "इंटरनेट वाले शहर", + "intro": "जहाँ अप्रचारित जनसमूह रहते हैं, वहाँ की कनेक्टिविटी। हर आँकड़ा अपने अवलोकन वर्ष के साथ मापा गया राष्ट्रीय आँकड़ा है —", + "introStrong": "“अज्ञात” का अर्थ है मापा नहीं गया, कभी अनुमानित नहीं।", + "countries": "देश: {n}", + "measured": "मापे गए: {n}", + "unknown": "अज्ञात: {n}", + "low": "कम कनेक्टिविटी: {n}", + "sectionMeta": "देश: {countries} · जनसमूह: {groups}", + "unmeasured": "नहीं मापे गए: {n}", + "rowMeta": "जनसमूह: {groups} · स्थान: {locations}", + "centres": "जनसंख्या केंद्र: {n}", + "mobPer100": "मोबाइल/100", + "band": { + "yes": "जुड़ा", + "partial": "आंशिक", + "no": "कम", + "unknown": "अज्ञात" + }, + "source": "इंटरनेट और मोबाइल आँकड़े: विश्व बैंक ओपन डेटा (CC BY 4.0), सबसे हाल का अवलोकन 2018–2024. श्रेणियाँ: जुड़ा ≥60% · आंशिक 25–59% · कम <25% आबादी इंटरनेट का उपयोग करती है। देश-स्तर का विवरण: इस पैमाने पर शहर-वार माप सार्वजनिक रूप से उपलब्ध नहीं हैं। इंटरनेट प्रदाताओं और ऑपरेटरों के नाम और सेंसरशिप का इतिहास हर देश के लिए उद्धृत रिपोर्टिंग माँगते हैं और यहाँ नहीं दिखाए गए हैं।" + }, + "tables": { + "title": "शहरों का डेटा", + "intro": "अप्रचारित जनसमूह कहाँ रहते हैं, और उन तक क्या पहुँचता है। किसी भी तालिका को क्रमबद्ध, फ़िल्टर और निर्यात करें; हर तालिका अपने स्रोत और सीमाएँ साथ रखती है।", + "tabs": { + "cities": "मुख्य शहर", + "internet": "कनेक्टिविटी", + "operators": "इंटरनेट प्रदाता और ऑपरेटर", + "social": "सोशल प्लेटफ़ॉर्म", + "messaging": "मैसेजिंग ऐप" + }, + "loading": "{name} लोड हो रहा है…" } } diff --git a/library/i18n/locales/it/connectivity.json b/library/i18n/locales/it/connectivity.json index dcda60e70..4ae10ba55 100644 --- a/library/i18n/locales/it/connectivity.json +++ b/library/i18n/locales/it/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Operatori e ISP ({n})", "socialPlatforms": "Piattaforme social", "note": "Dati nazionali, non misure per città. I nomi degli operatori sono titolari di registri ASN (includono banche e università oltre agli ISP), quindi l'etichetta di operatore è un'euristica basata sul nome, non una classificazione verificata." + }, + "list": { + "title": "Città con Internet", + "intro": "La connettività dove vivono i popoli non raggiunti. Ogni cifra è una statistica nazionale misurata, con il suo anno di rilevazione —", + "introStrong": "«sconosciuto» significa non misurato, mai presunto.", + "countries": "paesi: {n}", + "measured": "misurati: {n}", + "unknown": "sconosciuti: {n}", + "low": "bassa connettività: {n}", + "sectionMeta": "paesi: {countries} · popoli: {groups}", + "unmeasured": "non misurati: {n}", + "rowMeta": "popoli: {groups} · luoghi: {locations}", + "centres": "centri abitati: {n}", + "mobPer100": "mob./100", + "band": { + "yes": "connesso", + "partial": "parziale", + "no": "bassa", + "unknown": "sconosciuto" + }, + "source": "Dati su Internet e telefonia mobile: Open Data della Banca Mondiale (CC BY 4.0), rilevazione più recente 2018–2024. Fasce: connesso ≥60% · parziale 25–59% · bassa <25% della popolazione usa Internet. Risoluzione per paese: non esistono misurazioni pubbliche per città a questa scala. I nomi di provider e operatori e la storia della censura richiedono fonti citate per paese e non sono mostrati." + }, + "tables": { + "title": "Dati delle città", + "intro": "Dove vivono i popoli non raggiunti, e cosa li raggiunge. Ordina, filtra ed esporta ogni tabella; ognuna riporta le proprie fonti e i propri limiti.", + "tabs": { + "cities": "Città chiave", + "internet": "Connettività", + "operators": "Provider e operatori", + "social": "Social", + "messaging": "Messaggistica" + }, + "loading": "Caricamento di {name}…" } } diff --git a/library/i18n/locales/pt/connectivity.json b/library/i18n/locales/pt/connectivity.json index 80418217a..43f09d95c 100644 --- a/library/i18n/locales/pt/connectivity.json +++ b/library/i18n/locales/pt/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Operadoras e provedores ({n})", "socialPlatforms": "Redes sociais", "note": "Números nacionais, não medições por cidade. Os nomes das operadoras são titulares de registros ASN (incluem bancos e universidades além de provedores), então a marcação de operadora é uma heurística pelo nome, não uma classificação verificada." + }, + "list": { + "title": "Cidades com internet", + "intro": "Conectividade onde vivem os povos não alcançados. Cada número é uma estatística nacional medida, com o seu ano de observação —", + "introStrong": "«desconhecido» significa não medido, nunca presumido.", + "countries": "países: {n}", + "measured": "medidos: {n}", + "unknown": "desconhecidos: {n}", + "low": "baixa conectividade: {n}", + "sectionMeta": "países: {countries} · povos: {groups}", + "unmeasured": "não medidos: {n}", + "rowMeta": "povos: {groups} · locais: {locations}", + "centres": "centros populacionais: {n}", + "mobPer100": "móv./100", + "band": { + "yes": "conectado", + "partial": "parcial", + "no": "baixa", + "unknown": "desconhecido" + }, + "source": "Números de internet e telemóvel: Dados Abertos do Banco Mundial (CC BY 4.0), observação mais recente 2018–2024. Faixas: conectado ≥60% · parcial 25–59% · baixa <25% da população usa a internet. Resolução por país: não há medições públicas por cidade nesta escala. Nomes de fornecedores e operadoras e o histórico de censura exigem fontes citadas por país e não são mostrados." + }, + "tables": { + "title": "Dados das cidades", + "intro": "Onde vivem os povos não alcançados, e o que chega até eles. Ordene, filtre e exporte qualquer tabela; cada uma indica as suas fontes e limites.", + "tabs": { + "cities": "Cidades-chave", + "internet": "Conectividade", + "operators": "Fornecedores e operadoras", + "social": "Redes sociais", + "messaging": "Mensagens" + }, + "loading": "A carregar {name}…" } } diff --git a/library/i18n/locales/ro/connectivity.json b/library/i18n/locales/ro/connectivity.json index f0fbe09df..b25fd3206 100644 --- a/library/i18n/locales/ro/connectivity.json +++ b/library/i18n/locales/ro/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Operatori și ISP-uri ({n})", "socialPlatforms": "Platforme sociale", "note": "Cifre naționale, nu măsurători pe oraș. Numele operatorilor sunt titulari de înregistrări ASN (printre ei se află și bănci și universități, nu doar ISP-uri), deci eticheta de operator este o euristică după nume, nu o clasificare verificată." + }, + "list": { + "title": "Orașe cu internet", + "intro": "Conectivitatea acolo unde trăiesc popoarele neatinse. Fiecare cifră este o statistică națională măsurată, cu anul observației —", + "introStrong": "„necunoscut” înseamnă nemăsurat, niciodată presupus.", + "countries": "țări: {n}", + "measured": "măsurate: {n}", + "unknown": "necunoscute: {n}", + "low": "conectivitate scăzută: {n}", + "sectionMeta": "țări: {countries} · popoare: {groups}", + "unmeasured": "nemăsurate: {n}", + "rowMeta": "popoare: {groups} · locuri: {locations}", + "centres": "centre de populație: {n}", + "mobPer100": "mob./100", + "band": { + "yes": "conectat", + "partial": "parțial", + "no": "scăzut", + "unknown": "necunoscut" + }, + "source": "Cifre internet și mobil: Datele deschise ale Băncii Mondiale (CC BY 4.0), cea mai recentă observație 2018–2024. Categorii: conectat ≥60% · parțial 25–59% · scăzut <25% din populație folosește internetul. Rezoluție la nivel de țară: măsurătorile pe oraș nu sunt disponibile public la această scară. Numele furnizorilor și operatorilor și istoricul cenzurii necesită surse citate pentru fiecare țară și nu sunt afișate." + }, + "tables": { + "title": "Datele orașelor", + "intro": "Unde trăiesc popoarele neatinse și ce ajunge la ele. Sortați, filtrați și exportați orice tabel; fiecare își poartă sursele și limitele.", + "tabs": { + "cities": "Orașe-cheie", + "internet": "Conectivitate", + "operators": "Furnizori și operatori", + "social": "Platforme sociale", + "messaging": "Aplicații de mesagerie" + }, + "loading": "Se încarcă {name}…" } } diff --git a/library/i18n/locales/ru/connectivity.json b/library/i18n/locales/ru/connectivity.json index c37b02a5b..d9e594f8e 100644 --- a/library/i18n/locales/ru/connectivity.json +++ b/library/i18n/locales/ru/connectivity.json @@ -21,5 +21,38 @@ "carriers": "Операторы и провайдеры ({n})", "socialPlatforms": "Социальные платформы", "note": "Национальные данные, а не измерения по городам. Названия операторов — это владельцы записей в реестре ASN; среди них есть банки и университеты, а не только провайдеры, поэтому пометка «оператор» — эвристика по названию, а не проверенная классификация." + }, + "list": { + "title": "Города с интернетом", + "intro": "Связь там, где живут неохваченные народы. Каждая цифра — измеренная национальная статистика с годом наблюдения —", + "introStrong": "«неизвестно» значит «не измерено», а не предположено.", + "countries": "стран: {n}", + "measured": "измерено: {n}", + "unknown": "неизвестно: {n}", + "low": "слабая связь: {n}", + "sectionMeta": "стран: {countries} · народов: {groups}", + "unmeasured": "не измерено: {n}", + "rowMeta": "народов: {groups} · мест: {locations}", + "centres": "населённых центров: {n}", + "mobPer100": "моб./100", + "band": { + "yes": "подключено", + "partial": "частично", + "no": "слабо", + "unknown": "неизвестно" + }, + "source": "Данные об интернете и мобильной связи: открытые данные Всемирного банка (CC BY 4.0), последнее наблюдение 2018–2024. Категории: подключено ≥60% · частично 25–59% · слабо <25% населения пользуется интернетом. Разрешение по странам: данные по отдельным городам публично недоступны в таком масштабе. Названия провайдеров и операторов и история цензуры требуют источников по каждой стране и не показаны." + }, + "tables": { + "title": "Данные по городам", + "intro": "Где живут неохваченные народы и что до них доходит. Сортируйте, фильтруйте и экспортируйте любую таблицу; у каждой свои источники и ограничения.", + "tabs": { + "cities": "Ключевые города", + "internet": "Связь", + "operators": "Провайдеры и операторы", + "social": "Соцсети", + "messaging": "Мессенджеры" + }, + "loading": "Загрузка: {name}…" } } diff --git a/library/i18n/locales/zh/connectivity.json b/library/i18n/locales/zh/connectivity.json index d8b43dc61..396ac58c3 100644 --- a/library/i18n/locales/zh/connectivity.json +++ b/library/i18n/locales/zh/connectivity.json @@ -21,5 +21,38 @@ "carriers": "运营商和互联网服务商({n})", "socialPlatforms": "社交平台", "note": "这是全国数据,不是城市测量值。运营商名称来自 ASN 注册持有者——其中除互联网服务商外还包括银行和大学,因此“运营商”标记是基于名称的推断,并非经过核实的分类。" + }, + "list": { + "title": "联网城市", + "intro": "未接触族群所在地的网络连接情况。每个数字都是带有观测年份的实测国家统计 —", + "introStrong": "“未知”意味着未测量,绝不推测。", + "countries": "国家:{n}", + "measured": "已测量:{n}", + "unknown": "未知:{n}", + "low": "低连接:{n}", + "sectionMeta": "国家:{countries} · 族群:{groups}", + "unmeasured": "未测量:{n}", + "rowMeta": "族群:{groups} · 地点:{locations}", + "centres": "人口中心:{n}", + "mobPer100": "手机/百人", + "band": { + "yes": "已连接", + "partial": "部分", + "no": "低", + "unknown": "未知" + }, + "source": "互联网与移动数据:世界银行开放数据(CC BY 4.0),最近观测 2018–2024。分档:已连接 ≥60% · 部分 25–59% · 低 <25% 的人口使用互联网。国家级精度:此规模下没有公开的逐城测量数据。互联网服务商与运营商名称及审查历史需要逐国引用的报道,此处不显示。" + }, + "tables": { + "title": "城市数据", + "intro": "未接触族群生活在哪里,什么能触及他们。任何表格都可排序、筛选和导出;每张表都注明各自的来源与局限。", + "tabs": { + "cities": "重点城市", + "internet": "网络连接", + "operators": "网络服务商与运营商", + "social": "社交平台", + "messaging": "即时通讯" + }, + "loading": "正在加载{name}…" } } diff --git a/plugin-designs/cities-internet/connectivity-list.vue b/plugin-designs/cities-internet/connectivity-list.vue index 2be1b7c43..199824f54 100644 --- a/plugin-designs/cities-internet/connectivity-list.vue +++ b/plugin-designs/cities-internet/connectivity-list.vue @@ -34,8 +34,26 @@ import { computed, inject, ref } from 'vue' import { useShadowStyles } from '@map/composables/useShadowStyles.js' import data from './data/connectivity.json' +import { useI18n } from 'vue-i18n' +import enConnectivity from '@map/i18n/locales/en/connectivity.json' const profileConfig = inject('profileConfig', ref(null)) + +// ── UI text: library/i18n/locales//connectivity.json (the connectivity-map pattern) ────── +// i18n is OPTIONAL: useI18n() throws on a host that never installed it, so English from the +// shipped catalog is the fallback, never a blank or a key. Region and country names are data. +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()) const isDark = computed(() => profileConfig.value?.isDark === true) const countries = computed(() => data.countries || []) @@ -75,7 +93,7 @@ const totals = computed(() => { }) const band = (a) => a === 'yes' ? 'ok' : a === 'partial' ? 'mid' : a === 'no' ? 'low' : 'unk' -const bandLabel = (a) => a === 'yes' ? 'connected' : a === 'partial' ? 'partial' : a === 'no' ? 'low' : 'unknown' +const bandLabel = (a) => t('connectivity.list.band.' + (['yes', 'partial', 'no'].includes(a) ? a : 'unknown')) useShadowStyles( '.ci{position:absolute;inset:0;overflow-y:auto;padding:20px 18px 44px;background:#f6f7f9;color:#0f1419;' + @@ -119,17 +137,16 @@ useShadowStyles( diff --git a/plugin-designs/cities-internet/data-tables.vue b/plugin-designs/cities-internet/data-tables.vue index e82500a6c..f03b4eb48 100644 --- a/plugin-designs/cities-internet/data-tables.vue +++ b/plugin-designs/cities-internet/data-tables.vue @@ -25,12 +25,30 @@ import { computed, inject, ref, watch } from 'vue' import DataTable from '@map/components/tables/DataTable.vue' import { useShadowStyles } from '@map/composables/useShadowStyles.js' import { resolveAssetsBase } from '@map/utils/embedBase.js' +import { useI18n } from 'vue-i18n' +import enConnectivity from '@map/i18n/locales/en/connectivity.json' const profileConfig = inject('profileConfig', ref(null)) const isDark = computed(() => profileConfig.value?.isDark === true) const assetsBase = computed(() => resolveAssetsBase(profileConfig.value)) +// ── UI text: library/i18n/locales//connectivity.json (the connectivity-map pattern) ────── +// i18n is OPTIONAL: useI18n() throws on a host that never installed it, so English from the +// shipped catalog is the fallback, never a blank or a key. Region and country names are data. +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()) + const TABS = [ { id: 'cities', label: 'Key Cities', file: 'key-cities' }, { id: 'internet', label: 'Connectivity', file: 'country-connectivity' }, @@ -83,16 +101,13 @@ useShadowStyles(