fix: add Turkish locale references in config, tests, and docs

- hermes_cli/config.py: add tr to supported languages comment
- locales/en.yaml: add tr to locale file list comment
- tests/agent/test_i18n.py: add Turkish alias tests + explicit lang test
- website/docs/user-guide/configuration.md: add tr to supported values
This commit is contained in:
etherman-os 2026-05-05 19:30:09 +03:00 committed by Teknium
parent 985133852a
commit 39f451f5ad
4 changed files with 8 additions and 4 deletions

View file

@ -784,7 +784,7 @@ DEFAULT_CONFIG = {
# UI language for static user-facing messages (approval prompts, a
# handful of gateway slash-command replies). Does NOT affect agent
# responses, log lines, tool outputs, or slash-command descriptions.
# Supported: en, zh, ja, de, es, fr, uk. Unknown values fall back to en.
# Supported: en, zh, ja, de, es, fr, tr, uk. Unknown values fall back to en.
"language": "en",
# TUI busy indicator style: kaomoji (default), emoji, unicode (braille
# spinner), or ascii. Live-swappable via `/indicator <style>`.

View file

@ -7,7 +7,7 @@
#
# Keys are dotted paths; nesting below is purely for readability. Values may
# contain {placeholder} tokens for str.format substitution. When adding a
# new key, add it to EVERY locale file (en/zh/ja/de/es/fr/uk) in the same commit --
# new key, add it to EVERY locale file (en/zh/ja/de/es/fr/tr/uk) in the same commit --
# tests/agent/test_i18n.py asserts catalog parity.
approval:

View file

@ -92,6 +92,9 @@ def test_normalize_lang_accepts_aliases():
assert i18n._normalize_lang("Ukrainian") == "uk"
assert i18n._normalize_lang("uk-UA") == "uk"
assert i18n._normalize_lang("ua") == "uk"
assert i18n._normalize_lang("Turkish") == "tr"
assert i18n._normalize_lang("tr-TR") == "tr"
assert i18n._normalize_lang("türkçe") == "tr"
def test_normalize_lang_unknown_falls_back():
@ -130,6 +133,7 @@ def test_t_explicit_lang():
assert i18n.t("approval.denied", lang="en").endswith("Denied")
assert i18n.t("approval.denied", lang="zh").endswith("已拒绝")
assert i18n.t("approval.denied", lang="uk").endswith("Відхилено")
assert i18n.t("approval.denied", lang="tr").endswith("Reddedildi")
def test_t_formats_placeholders():

View file

@ -1167,14 +1167,14 @@ display:
show_cost: false # Show estimated $ cost in the CLI status bar
tool_preview_length: 0 # Max chars for tool call previews (0 = no limit, show full paths/commands)
runtime_metadata_footer: false # Gateway: append a runtime-context footer to final replies
language: en # UI language for static messages (approval prompts, some gateway replies). en | zh | ja | de | es | fr | uk
language: en # UI language for static messages (approval prompts, some gateway replies). en | zh | ja | de | es | fr | tr | uk
```
### UI language for static messages
The `display.language` setting translates a small set of static user-facing messages — the CLI approval prompt, a handful of gateway slash-command replies (e.g. restart-drain notices, "approval expired", "goal cleared"). It does **not** translate agent responses, log lines, tool output, error tracebacks, or slash-command descriptions — those stay in English. If you want the agent itself to reply in another language, just tell it in your prompt or system message.
Supported values: `en` (default), `zh` (Simplified Chinese), `ja` (Japanese), `de` (German), `es` (Spanish), `fr` (French), `uk` (Ukrainian). Unknown values fall back to English.
Supported values: `en` (default), `zh` (Simplified Chinese), `ja` (Japanese), `de` (German), `es` (Spanish), `fr` (French), `tr` (Turkish), `uk` (Ukrainian). Unknown values fall back to English.
You can also set this per-session with the `HERMES_LANGUAGE` env var, which overrides the config value.