Skip to content

fix(dashboard): localize remaining hardcoded Chinese UI strings (browser AI panel, skill recording, PWA guides) - #1799

Merged
jubaoliang merged 1 commit into
TencentCloud:developfrom
fengyue-xve:fix/i18n-hardcoded-chinese
Oct 8, 2026
Merged

jubaoliang merged 1 commit into
TencentCloud:developfrom
fengyue-xve:fix/i18n-hardcoded-chinese

Conversation

@fengyue-xve

Copy link
Copy Markdown

Summary

Addresses #1720. In the English UI several dashboard surfaces still rendered hardcoded Chinese because the strings never went through i18n. This PR covers the reporter's scenario (browser AI assistant / skill recording) plus a few other visible spots:

  • Browser AI assistant panel (BrowserAiPanel): all chat messages and toasts pushed during skill recording/replay (objective set, recording preview + truncation notice, failed script generation, skill applied, replay started/done/failed, in-progress hint) now go through t(). The trigger keyword lists (结束/确认/end/confirm …) stay hardcoded on purpose — those match what the user types, not UI copy.
  • Skill recording workflow (useSkillRecordingWorkflow, useChatSend): same messages pushed from the Chat page and the pending-message auto-record path.
  • PWA install prompt (PwaInstallPrompt): button label/tooltip and the iOS / desktop install guide sheets.
  • MBTI persona tag (MbtiPersonaTag): replaced the hardcoded ZH/EN name maps with mbti.* translation keys (labels now follow the active language through i18next instead of an i18n.language === "zh" check).
  • Collapsed sidebar update badge ("新"): now translated; the badge CSS went from a fixed 14px circle to a pill so "NEW" fits.

~60 keys were added to both en.json and zh.json; where a suitable key already existed (skillRecord.*, browser.recordReplay.*) it is reused instead of duplicating. Both locale files stay in parity (6019 keys, same {{placeholder}} sets).

Remaining hardcoded strings elsewhere in the dashboard (~600, mostly debug/PWA diagnostics, connectors, attachments lists) are untouched here and can follow in separate PRs to keep this reviewable.

Target branch

  • Base is develop (feature / fix — default)

Type of change

  • Bug fix

Test plan

  • npx tsc -b — clean

  • npx eslint on all changed files — clean

  • npx prettier --check on all changed files — clean

  • npx vitest run — 1145 passed, 8 failed; the 8 failures are pre-existing on an unmodified checkout in this environment (useSessions, skillMarkdown, SkillDrawer, knowledgeBases, publishedExperts, docxSanitize) and unrelated to this diff

  • Verified en.json / zh.json key parity (6019 keys each, 0 one-sided) and placeholder parity for every key touched

  • make all passes locally (could not run the full Python stack in this environment — dashboard checks above were run instead)

  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

English users still saw Chinese text in the browser AI assistant panel,
skill recording/replay chat messages, the PWA install guide, MBTI persona
tags, and the collapsed sidebar update badge. Route these strings through
the existing i18n keys where present, add new keys to both locale files,
and cover the skill-record workflow hook and pending-message handler.
@jubaoliang
jubaoliang merged commit 6dfb076 into TencentCloud:develop Oct 8, 2026
3 checks passed
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.

2 participants