Skip to content

feat: add English/Chinese UI language switching#13

Open
zhangyang-crazy-one wants to merge 3 commits into
Server-Pulse:mainfrom
zhangyang-crazy-one:feat/chinese-ui
Open

feat: add English/Chinese UI language switching#13
zhangyang-crazy-one wants to merge 3 commits into
Server-Pulse:mainfrom
zhangyang-crazy-one:feat/chinese-ui

Conversation

@zhangyang-crazy-one

Copy link
Copy Markdown

Summary

  • Add an i18n package with English source strings and Simplified Chinese translations.
  • Support runtime language toggle with L / Ctrl+L (persisted to ~/.server-pulse/config.json).
  • Default remains English; Chinese is opt-in via the toggle.
  • Keep internal action keys unchanged so Docker/process operations stay compatible.

Why not hard-coded Chinese?

A previous draft replaced the UI with Chinese-only text. This PR instead makes language switchable so upstream English users are unaffected.

Test plan

  • go build . succeeds
  • go test ./utils/... passes
  • Launch app: default UI is English
  • Press L (or Ctrl+L): menus switch to 中文
  • Press L again: back to English
  • Restart app: last language preference is restored
  • Process kill / container actions still work in both languages

zhangyang-crazy-one and others added 3 commits July 24, 2026 19:31
Translate user-facing labels, help text, tables, and status messages so the dashboard is usable in Chinese while keeping internal action keys unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce an i18n layer with runtime toggle (L / Ctrl+L), persist the
choice in ~/.server-pulse/config.json, and keep English as the default
source language for upstream compatibility.
Include L / Ctrl+L in the home and other ShortHelp footers so the
language switch is discoverable without opening full help.

Co-authored-by: Cursor <cursoragent@cursor.com>
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