mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
Addresses @tonydwb's review on PR #54872 (12:05 UTC, 2026-06-29): > the hardcoded Chinese text in the wake messages (lines 118-128 of > the diff) should be replaced with English or internationalized. > The rest of the codebase uses English for user-facing messages, > and hardcoded Chinese will confuse non-Chinese users. Consider > using a constants dict or the existing i18n infrastructure. Used the existing i18n infrastructure (agent/i18n.py::t()) — the same surface gateway/run.py and slash_commands.py already use for static user-facing strings. ## Changes - gateway/kanban_watchers.py: import `t` from agent.i18n; replace the hardcoded Chinese strings in the synthetic wake-up message with t("gateway.kanban.wake.*") lookups. Behavior unchanged for zh users (zh catalog preserves the original Chinese phrasing). - locales/en.yaml: new `gateway.kanban.wake.*` baseline keys (English): completed / gave_up / crashed / timed_out / blocked / status_default / status_joiner / message (with {task_id} {status} {title} {assignee} {board} placeholders). - locales/zh.yaml: Chinese translation of the new keys, preserving the exact wording the original code used (so existing zh users see no visible change). - locales/{zh-hant,ja,de,es,fr,tr,uk,af,ko,it,ga,pt,ru,hu}.yaml: added the same key set with English fallback values. The i18n invariant test (tests/agent/test_i18n.py::test_catalog_keys_match_english) requires every catalog to carry the same key set as en.yaml; native translations can land incrementally without breaking users (the loader falls back to en.yaml per-key when a translation is missing, but the key must still exist). ## Verification - scripts/run_tests.sh tests/agent/test_i18n.py tests/gateway/test_kanban_watchers_mixin.py tests/gateway/test_kanban_notifier.py tests/gateway/test_kanban_notifier_watcher_dispatch_gate.py → 60 passed, 0 failed (i18n catalog parity + placeholders parity + existing kanban notifier behavior). - Manual: with HERMES_LANGUAGE=en, t("gateway.kanban.wake.completed") returns "completed"; with HERMES_LANGUAGE=zh, returns "已完成"; with HERMES_LANGUAGE=ja (translation pending), falls back to "completed" per-key. |
||
|---|---|---|
| .. | ||
| af.yaml | ||
| de.yaml | ||
| en.yaml | ||
| es.yaml | ||
| fr.yaml | ||
| ga.yaml | ||
| hu.yaml | ||
| it.yaml | ||
| ja.yaml | ||
| ko.yaml | ||
| pt.yaml | ||
| ru.yaml | ||
| tr.yaml | ||
| uk.yaml | ||
| zh-hant.yaml | ||
| zh.yaml | ||