Skip to content

fix: add i18n to status dialog and replace silent session abort catches with logging#805

Open
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-0616-status-i18n-abort-logging
Open

fix: add i18n to status dialog and replace silent session abort catches with logging#805
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-0616-status-i18n-abort-logging

Conversation

@MrRealORG

Copy link
Copy Markdown

Summary

i18n + code quality improvements

Status dialog i18n (dialog-status.tsx)

  • Added useLanguage() import and t() calls for all 11 user-facing strings
  • Replaces hardcoded English: "Status", "No MCP Servers", "Connected", "Pending approval", "Disabled in configuration", etc.
  • Uses {{count}} interpolation for plural labels (e.g. "{{count}} MCP Servers")
  • Uses {{name}} interpolation for the auth command hint
  • Also fixes opencode mcp authmimo mcp auth in the needs-auth message

i18n keys (en.ts + zh.ts)

  • Added 12 new keys under tui.status.* namespace
  • English and Chinese translations
  • Other locales (es, fr, ja, ru, zht) will fall back to English

Session abort logging (routes/session/index.tsx)

  • Replaced 2 silent .catch(() => {}) with log.warn():
    • Line 298: session abort on exit key press
    • Line 547: session abort before undo/revert
    • Added Log import and logger creation

Files changed

  • dialog-status.tsx: 26 insertions, 15 deletions (i18n + import)
  • en.ts: 16 insertions, 1 deletion (12 new keys)
  • zh.ts: 15 insertions (12 new keys)
  • session/index.tsx: 6 insertions, 2 deletions (import + logger + 2 catches)

…es with logging

- Add useLanguage() to dialog-status.tsx, replacing 11 hardcoded English strings
  with i18n keys (tui.status.*) — covers MCP servers, LSP servers, formatters,
  plugins, and connection status messages
- Add 12 i18n keys to en.ts and zh.ts with {{count}}/{{name}} interpolation
- Replace 2 silent .catch(() => {}) in routes/session/index.tsx with log.warn
  for session abort failures (exit path + undo/revert path)
- Also fix 'opencode mcp auth' → 'mimo mcp auth' in status dialog
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