Skip to content

Settings › Access / Admin panels ignore the language setting (hardcoded zh strings) #201

Description

@svidov

Settings › Access / Admin panels ignore the language setting (hardcoded zh strings)

Version: ccteam 0.11.0 (3ed05d4), standalone install, Linux x86_64 Setting: General › language = en

What happens
With the UI language set to English, the whole shell renders in English except three panels under Settings, which render in Chinese:

Access › Telegram card: badges 已连接 / 未配置, the red hint 尚未绑定 chat — 设好 token 后在下方 DM 机器人。, footer 下次 daemon 重启生效, buttons 取消 / 确认覆盖 / 保存 token
Access › Lark / 飞书 card: 区域·Region, 允许的 open_id(逗号或换行分隔), 空 allowlist = fail-closed:机器人谁也不回。, 保存, and the app-secret footer
Admin tab: 用户管理 · Users, 管理员, the subtitle, table headers 用户 / 角色 / 创建 / 操作, 还没有用户。添加一个吧。, 新用户名 / Handle, 添加用户, and the one-time-link footer
Why
crates/ccteam-web/web/src/pages/SettingsPage.tsx carries these strings as literal JSX text instead of going through lib/i18n.ts. In that file there are 0 calls to tr(lang, zh, en) and only a handful of t("...") keys; ~100 lines contain CJK literals (e.g. lines 239, 241, 272, 283, 298). UserManagementSection() (line 1121) takes no lang prop at all, and SettingsView.tsx renders it as even though it has lang in scope (line 75). TelegramSection / LarkSection default lang = "zh" and only use t() for one key each.

The header comment in i18n.ts already acknowledges this: "the long-tail of embedded panels that still carry their strings inline."

Proposed fix
Happy to open a PR for this. Plan:

Add the missing keys to I18N.zh / I18N.en in lib/i18n.ts (prefix access* / admin*, matching the existing accessMcp* keys).
In SettingsPage.tsx, replace each literal with t("key") from the existing makeT(lang).
Give UserManagementSection a lang?: Lang prop and pass lang={lang} from SettingsView.tsx.
Extend SettingsPage.test.tsx with one assertion per panel that lang="en" renders no CJK characters (regex /[一-鿿]/).
Same pattern applies to the remaining inline panels if you want it in the same PR: MarketplaceView.tsx (~47 CJK lines), WorkflowView.tsx (~31), HomeView.tsx (~20), AvatarMenu.tsx (~18), SessionView.tsx (~15).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions