Skip to content

feat(service): add English and Chinese localization to the console - #2851

Open
guslegend0510 wants to merge 7 commits into
agentscope-ai:mainfrom
guslegend0510:codex/feat-2843-frontend-i18n
Open

feat(service): add English and Chinese localization to the console#2851
guslegend0510 wants to merge 7 commits into
agentscope-ai:mainfrom
guslegend0510:codex/feat-2843-frontend-i18n

Conversation

@guslegend0510

Copy link
Copy Markdown
Contributor

Description

Closes #2843

This PR adds lightweight English and Chinese localization to the AgentScope Service console.

What changed

  • add a dependency-free typed i18n provider with English fallback, browser locale detection, persisted language selection, and synchronized <html lang>
  • migrate the shell, shared components, Managed/Build, Operate, Teams, Admin, and Profile UI to paired English and Chinese catalogs
  • localize known display statuses, dates, numbers, relative times, placeholders, accessibility labels, confirmations, empty states, and frontend-owned errors
  • preserve API payloads, raw backend errors, IDs, URLs, machine enums, and user/model content
  • add an AST-based i18n guard, Node.js 22 frontend CI, and committed bundle synchronization checks
  • rebuild the static console assets served from agentscope-service/aistio/ui

Validation

  • npm ci
  • npm run verify
    • 1,093 paired messages across 110 source files
    • 28 Vitest tests passed
    • TypeScript build passed
    • ESLint: 0 errors
    • production Vite build passed
  • production preview loads the localized bundle and sets <html lang="zh"> for a Chinese browser locale

Checklist

  • Code has been formatted with mvn spotless:apply (not applicable: frontend-only change)
  • All frontend tests are passing (npm run verify)
  • Javadoc requirement is not applicable to this frontend-only change
  • Related English and Chinese documentation has been updated
  • Code is ready for review

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

[Feature]: Add i18n (Chinese / English) support to agentscope-service/frontend

2 participants