Files
hermes-webui/tests
Yularzhi 4d2b35b943 fix(i18n): route Extensions panel through t() and patch 15 locales (#7581)
The Extensions settings pane (Gallery / Installed / Diagnostics) was the
last large user-facing surface still rendering hardcoded English:

- static/index.html carried the section meta, both loading placeholders,
  the Copy diagnostics button, and the whole Trust-model explainer block
  as plain HTML with no data-i18n attributes.
- static/panels.js built the runtime / diagnostics cards from template
  literals with 14 untranslated row labels, a separate installed card,
  asset and warning card titles, sidecar card fields (Origin / Health
  path / Health URL / Proxy / Proxy path), the Enabled/Disabled and
  true/false badges, and every empty-state string (None, No warnings,
  No extension directory is configured., No manifest extensions are
  installed in the configured bundle., No loopback sidecars declared.)
  inline in JS.

Every one of those call sites now routes through t() and the plain
strings live in the locale bundles. data-i18n is used for the static
HTML (the same mechanism the other selects already use, per #7582
triage), and esc(t(...)) for the template-literal DOM built in
panels.js so no injected text can introduce markup.

Locale keys are added to all 15 shipped locale bundles (en, ru, it, ja,
es, de, zh, zh-Hant, pt, ko, fr, cs, tr, pl, vi), following the same
key-parity contract that the #7602 triage enforced for the
sessions_source keys: inserted right after each locale's identity
(_label:_speech_) line so the brace-bounded locale extraction still
finds the whole block, matching the same pattern upstream used to fix
the sessions_source parity. No locale falls back to English at runtime
because t() resolves every bundle.

tests/test_extensions_settings_panel.py: assertions that used to match
the inline English strings now match the corresponding locale keys, and
the state_unknown_ids hint asserts both the key is used and the raw
English is gone.

Verified:
- python3 -m pytest tests/ -k "i18n or extension or parity or japanese"
 -q  ->  496 passed
- node --check on the three touched static assets -> all valid

Fixes #7581. Same surgical slice as #7602 (linked from #7579).
2026-09-17 09:20:41 +03:00
..