i18n(loop): localize 14 user-facing yields in step()#445
Merged
Conversation
Yields like 'session budget exhausted', 'aborted at iter X/Y', 'preflight: request ~X/Y tokens', and the post-turn fold/forcing- summary status lines were all hardcoded English. The loop.* i18n namespace had 7 keys defined but never wired — placeholders from a previous attempt that drifted away from the actual call sites. This PR replaces the dead namespace with 20 keys that match the actual yield shapes, wires t() at every site, and adds zh-CN translations. Categories covered: - budget (exhausted / 80% warning) - /pro armed - aborted-at-iter / tool-budget-warning - preflight (status + folded / no-fold-left) - escalation (flash → pro / auto-escalation) - storm-broken (stuck retry loop / suppressed-N-times) - history compaction (status + folded / aggressively-folded) - forcing summary (context-guard exit) Behavior preserved: tests pin runtime to EN, so existing assertions on the English text still pass. The dead loop.* keys (budgetWarning, budgetRefusal, contextWarning, escalationWarning, toolFailure, interrupted, loopStopped) had zero callers across src/ and tests/ and are removed as part of the namespace cleanup.
2 tasks
esengine
added a commit
that referenced
this pull request
May 8, 2026
Two small follow-on batches after #445: 1. hooks.formatHookOutcomeMessage — was hardcoded \`hook \${tag} \\`\${cmd}\\` \${decision}\${truncTag}\`. Pulls the structural words (\"hook\", decision verb, \" (output truncated at 256KB)\") into a new \`hooks.*\` namespace. The technical bits (tag, cmd) stay verbatim — they're identifiers, not prose. 2. loop/force-summary.ts — three user-visible strings: - \"summarizing what was gathered…\" (status during summary call) - the fallback when the model emits hallucinated tool-call markup instead of prose - the error template when the fallback summary itself crashes New \`summary.*\` namespace covers all three. zh-CN translations included. Decision verbs (block / warn / timeout / error) are translated via a small \`hooks.decision\${Capitalize}\` lookup so the formatter still takes \`outcome.decision\` (the typed enum) as input. Test plan: full suite 2301 pass; tsc + biome clean.
3 tasks
esengine
added a commit
that referenced
this pull request
May 8, 2026
Two patterns rolled into one PR: 1. Wire seven existing ui.* keys that had been defined in EN.ts / zh-CN.ts but never actually called: ephemeralSession, resumedSession, newSession, restoredEdits, resumedPlan, tipEditBindings, dashboardAutoStartFailed. The keys had drifted into dead code — same pattern that bit the loop.* namespace before #445. 2. New app.* namespace (~24 keys) covering every other hardcoded user-facing string in App.tsx: - walk cancel (with / without remaining count) - edit-mode cycle (review / auto / yolo) - reject / auto-approve / flip-to-auto messages - dashboard stopped, /restore code-mode-only - hash-memory note (with translated scope + verb) - bash-mode + memory-write failures - hook headers (UserPromptSubmit, Stop) - @mentions / @url expansion + failure - shell confirm (deny / always-allow / running / starting) - checkpoint saved - plan continue / stop / revise zh-CN translations for all 31 new keys. Test plan: full suite 2301 pass, tsc + biome clean.
3 tasks
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
Yields like 'session budget exhausted', 'aborted at iter X/Y', 'preflight: request ~X/Y tokens', and the post-turn fold/forcing- summary status lines were all hardcoded English. The loop.* i18n namespace had 7 keys defined but never wired — placeholders from a previous attempt that drifted away from the actual call sites. This PR replaces the dead namespace with 20 keys that match the actual yield shapes, wires t() at every site, and adds zh-CN translations. Categories covered: - budget (exhausted / 80% warning) - /pro armed - aborted-at-iter / tool-budget-warning - preflight (status + folded / no-fold-left) - escalation (flash → pro / auto-escalation) - storm-broken (stuck retry loop / suppressed-N-times) - history compaction (status + folded / aggressively-folded) - forcing summary (context-guard exit) Behavior preserved: tests pin runtime to EN, so existing assertions on the English text still pass. The dead loop.* keys (budgetWarning, budgetRefusal, contextWarning, escalationWarning, toolFailure, interrupted, loopStopped) had zero callers across src/ and tests/ and are removed as part of the namespace cleanup.
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
…engine#446) Two small follow-on batches after esengine#445: 1. hooks.formatHookOutcomeMessage — was hardcoded \`hook \${tag} \\`\${cmd}\\` \${decision}\${truncTag}\`. Pulls the structural words (\"hook\", decision verb, \" (output truncated at 256KB)\") into a new \`hooks.*\` namespace. The technical bits (tag, cmd) stay verbatim — they're identifiers, not prose. 2. loop/force-summary.ts — three user-visible strings: - \"summarizing what was gathered…\" (status during summary call) - the fallback when the model emits hallucinated tool-call markup instead of prose - the error template when the fallback summary itself crashes New \`summary.*\` namespace covers all three. zh-CN translations included. Decision verbs (block / warn / timeout / error) are translated via a small \`hooks.decision\${Capitalize}\` lookup so the formatter still takes \`outcome.decision\` (the typed enum) as input. Test plan: full suite 2301 pass; tsc + biome clean.
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
Two patterns rolled into one PR: 1. Wire seven existing ui.* keys that had been defined in EN.ts / zh-CN.ts but never actually called: ephemeralSession, resumedSession, newSession, restoredEdits, resumedPlan, tipEditBindings, dashboardAutoStartFailed. The keys had drifted into dead code — same pattern that bit the loop.* namespace before esengine#445. 2. New app.* namespace (~24 keys) covering every other hardcoded user-facing string in App.tsx: - walk cancel (with / without remaining count) - edit-mode cycle (review / auto / yolo) - reject / auto-approve / flip-to-auto messages - dashboard stopped, /restore code-mode-only - hash-memory note (with translated scope + verb) - bash-mode + memory-write failures - hook headers (UserPromptSubmit, Stop) - @mentions / @url expansion + failure - shell confirm (deny / always-allow / running / starting) - checkpoint saved - plan continue / stop / revise zh-CN translations for all 31 new keys. Test plan: full suite 2301 pass, tsc + biome clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Yields like "session budget exhausted", "aborted at iter X/Y", "preflight: request ~X/Y tokens", and the post-turn fold / forcing-summary status lines were all hardcoded English in `src/loop.ts`. A Chinese user only sees their own typed text in zh-CN — every guardrail message from the loop reverts to English.
The `loop.*` i18n namespace had 7 keys defined but never wired anywhere — placeholders from a previous i18n attempt that drifted away from the actual call sites. Confirmed with grep: zero callers across `src/` and `tests/`.
What
20 new keys covering every user-facing yield in `step()`:
Plus zh-CN translations for all 20.
The dead keys (`budgetWarning`, `budgetRefusal`, `contextWarning`, `escalationWarning`, `toolFailure`, `interrupted`, `loopStopped`) are removed as part of the cleanup. They had zero callers — removing them frees the names without a deprecation period.
Test plan
Follow-ups (separate PRs)