fix(i18n): keep values the AI tools read in English

- Satellite class in analyst records and voice payloads stays English
  ("STATION", "COMMS"), so voice filters on the class work in every
  language; cards and the legend still show the translated label.
- Layer source names (OSM routing, ALPR sources) stay English in layer
  state; the layer row translates them.
- New translateKnown(): catalog text when there is an entry, the given text
  otherwise, with no warning. The layer row uses it for loading labels and
  errors, Recent Imagery for its notices.
- Mark the remaining Recent Imagery and wind messages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-13 20:09:45 +04:00
1 parent 0c647a791b
commit 2c74057b5e
13 files changed
+60 -20

No files matched your search

+12
View File
@@ -109,6 +109,18 @@ export function tn(count, one, other, values) {
return interpolate(pattern, { ...values, count });
}
/**
* Translate text that may be ours or may come from a provider: a catalog
* entry is used when there is one, anything else shows as given, without a
* missing-translation warning.
*/
export function translateKnown(text) {
const catalog = CATALOGS[currentLocale];
if (!catalog || typeof text !== 'string') return text;
const entry = catalog[text];
return typeof entry === 'string' ? entry : text;
}
/** Mark English text that is stored in data and translated later by t(). */
export function msg(text) {
return text;
+3 -1
View File
@@ -2030,5 +2030,7 @@
"subject": "sujeto",
"{value}m": "{value} m",
"Google 3D tiles unavailable — check the key's API restrictions, quota, or network": "Teselas de Google 3D no disponibles: revisa las restricciones de API de la clave, la cuota o la red",
"Needs {envVars} — add it in Provider Settings — or a Cesium ion token for the ion-hosted route": "Necesita {envVars} — añádela en Ajustes de proveedores — o un token de Cesium ion para la ruta alojada en ion"
"Needs {envVars} — add it in Provider Settings — or a Cesium ion token for the ion-hosted route": "Necesita {envVars} — añádela en Ajustes de proveedores — o un token de Cesium ion para la ruta alojada en ion",
"Comparison in use by another scene": "La comparación está en uso por otra escena",
"A location reading needs a loaded forecast and the Earth at the center of the view.": "Una lectura en un punto necesita un pronóstico cargado y la Tierra en el centro de la vista."
}
+3 -1
View File
@@ -2062,5 +2062,7 @@
"subject": "объект",
"{value}m": "{value} м",
"Google 3D tiles unavailable — check the key's API restrictions, quota, or network": "Тайлы Google 3D недоступны — проверьте ограничения API ключа, квоту или сеть",
"Needs {envVars} — add it in Provider Settings — or a Cesium ion token for the ion-hosted route": "Нужен {envVars} — добавьте его в «Настройках провайдеров» — или токен Cesium ion для маршрута через ion"
"Needs {envVars} — add it in Provider Settings — or a Cesium ion token for the ion-hosted route": "Нужен {envVars} — добавьте его в «Настройках провайдеров» — или токен Cesium ion для маршрута через ion",
"Comparison in use by another scene": "Сравнение занято другой сценой",
"A location reading needs a loaded forecast and the Earth at the center of the view.": "Для показания в точке нужен загруженный прогноз и Земля в центре вида."
}