Repository navigation
[Agent] i18n: fill missing translations in all locales (~44% coverage today) #656
Copy link
Copy link
Closed
Labels
agent-candidateMaintainer-approved issue for a managed agent PR; merge stays manualMaintainer-approved issue for a managed agent PR; merge stays manualenhancementNew feature or requestNew feature or requestjavascriptPull requests that update javascript codePull requests that update javascript code
Description
Problem and evidence
The non-English locales cover about 44% of the UI. In web/public/locales/, en.json has 2,645 leaf keys, while es/de/fr/it/ja/ko/zh/ru/uk/tr/nl/pl/pt-PT/ar have about 1,158. fil, pt-BR and zh-TW also lag. Missing keys fall back to English (web/js/i18n.js), so whole features show in English in every other language.
Biggest gaps, measured on es.json:
| Namespace | Missing keys |
|---|---|
settings.* |
297 |
live.* |
205 |
events.* (Event Routing) |
184 |
investigation.* |
157 |
fleet.* |
137 |
system.* |
84 |
collections.* |
76 |
tokens.* |
73 |
access.* |
70 |
audit.* |
50 |
setupWizard.* |
36 |
| others | ~120 |
Expected behavior and scope
- Add the missing keys to every locale listed in
web/public/locales/manifest.json, translated fromen.json. - Keep
{placeholder}interpolation tokens exactly as they are, and keep any HTML and keyboard shortcuts unchanged. - Use consistent terminology within each locale. Reuse the wording the locale already uses for terms like "stream", "recording", "detection" and "retention" (check the existing keys first).
- Product and protocol names stay untranslated: LightNVR, go2rtc, ONVIF, RTSP, WebRTC, HLS, MSE, MQTT, S3, PTZ, TOTP.
- Add a script or Jest test (
web/tests/locale-coverage.test.jsor similar) that reports per-locale coverage and fails if any locale has a keyen.jsonlacks (orphans), or if placeholder tokens don't matchen. Missing keys should only warn, so new English strings don't block CI. - If this issue is too big for one PR, split it by namespace group (for example
settings+system,live+setupWizard,events+investigation+collections+fleet,access+tokens+audit). Each PR covers all locales for its namespaces.
Acceptance criteria
- Every locale reaches ≥ 98% of
en.jsonkeys, or 100% for the namespaces covered by a partial PR. - The placeholder and orphan check passes for every locale.
- Every JSON file is valid and keeps the existing key order and nesting style. No unrelated reformatting churn.
- Spot-check: switching to
de,jaandarin the UI shows no English on the Settings, Event Routing and Investigation pages.
Validation
cd web && npm test(including the new coverage test) andnpx vite build.- Ideally a native speaker reviews ja/zh/ar/ko afterwards. Note in the PR that the translations were machine-produced.
Constraints and rollback
- Only touch the locale JSON files, plus the new coverage test or script.
- Rollback: revert. English fallback keeps working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent-candidateMaintainer-approved issue for a managed agent PR; merge stays manualMaintainer-approved issue for a managed agent PR; merge stays manualenhancementNew feature or requestNew feature or requestjavascriptPull requests that update javascript codePull requests that update javascript code
Activity