Skip to content

i18n(app): localize ~26 user-facing strings in App.tsx#447

Merged
esengine merged 1 commit into
mainfrom
i18n/app-slash-output
May 8, 2026
Merged

i18n(app): localize ~26 user-facing strings in App.tsx#447
esengine merged 1 commit into
mainfrom
i18n/app-slash-output

Conversation

@esengine

@esengine esengine commented May 8, 2026

Copy link
Copy Markdown
Owner

Why

Last big batch of hardcoded English in the chat UI. A Chinese user saw their own typed prompts in zh-CN but every system row from `App.tsx` (session banners, edit-mode flips, hook warnings, shell confirms, checkpoint saves) reverted to English.

What

Two patterns rolled together since they touched the same lines:

1. Wire existing `ui.*` keys

Seven keys in EN.ts / zh-CN.ts had been declared but never called — same dead-key pattern that bit the `loop.*` namespace before #445:

  • `ui.ephemeralSession`
  • `ui.resumedSession` (with `{name}` / `{count}`)
  • `ui.newSession`
  • `ui.restoredEdits`
  • `ui.resumedPlan` (used in `log.showPlan({ title })`)
  • `ui.tipEditBindings` (the multi-line edit-gate cheatsheet)
  • `ui.dashboardAutoStartFailed`

2. New `app.*` namespace

~24 keys for everything else:

Group Keys
Walk modal `walkCancelled`, `walkCancelledRemaining`
Edit mode cycle `editModeReview`, `editModeAuto`, `editModeYolo`
Edit gate `rejectedEdit`, `autoApprovingRest`, `flippedAutoSession`, `flippedAutoWalk`
Dashboard `dashboardStopped`
Hash memory `notedMemory`, `notedScope{Project,Global}`, `notedVerb{Created,Appended}`
Errors `memoryWriteFailed`, `commandFailed`, `atUrlFailed`
Hook header rows `hookUserPromptSubmit`, `hookStop`
@mentions `atMentions`, `atUrl`
Shell confirm `denied`, `alwaysAllowed`, `runningCommand`, `startingBackground`
Misc `restoreCodeOnly`, `checkpointSaved`, `continuingAfter`, `planStoppedAt`, `revisingAfter`

zh-CN translations for all 31 added keys.

Test plan

  • Full suite 2301 pass — vitest `setupFiles` pins runtime to EN, so every English assertion still matches
  • tsc + biome clean
  • No new tests added — these are status-line outputs without dedicated assertions

What's still hardcoded (next PRs)

  • Inline `(${ex.bytes ?? 0).toLocaleString()} bytes` / `${ex.path} (${ex.skip})` style mention/URL list builders inside `App.tsx:2400-2440` — the `▸ @mentions: …` wrapper is now translated, but the comma-joined parts inside aren't (they mix paths, sizes, and skip-reasons in a structural way that would need a different shape to localize cleanly)
  • Slash command handler outputs in `src/cli/ui/slash/handlers/*` — hundreds of strings, separate sweep

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.
@esengine esengine merged commit 0990491 into main May 8, 2026
3 checks passed
@esengine esengine deleted the i18n/app-slash-output branch May 8, 2026 12:01
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant