Skip to content

Studio design surface: ~88 hardcoded Chinese strings bypass the existing i18n layer (mixed-language screens) #2264

Description

@os-zhuang

Mirror of framework#2615 (P2 mixed-language item), found by the Studio package-create UX dogfood (framework#2609) and scoped by a source scan at 4fbf910.

Symptom

Single screens render half-English, half-Chinese regardless of locale: the Studio landing is fully Chinese (应用构建 / 新建软件包) next to an English Home; the builder shows English chrome with embedded Chinese (添加字段 / 未分组 / 请选择… / 拖动字段排序…); the record form shows a 请选择… placeholder inside an otherwise-English dialog.

Root cause (scan result)

packages/app-shell/src/views/studio-design/ hardcodes user-visible Chinese directly in JSX/string literals instead of using the i18n layer that already exists and is partially used in the same files (e.g. StudioDesignSurface.tsx calls tFormat('engine.studio.pkg.created', locale, …), and metadata-admin/i18n.ts already defines keys like engine.packages.new: '新建软件包' and engine.form.addFieldPlain: '添加字段').

Non-comment CJK string lines per file:

Filelines
BuilderLanding.tsx23
ObjectValidationsPanel.tsx18
StudioDesignSurface.tsx16
ObjectFormDesigner.tsx16
ObjectSettingsPanel.tsx13
metadataError.ts, packages-io.ts1 each

≈88 lines total — a bounded, mechanical fix: hoist each literal into the existing key table (several keys already exist) and render through the same tFormat/locale path the rest of the console uses, with English defaults.

Acceptance

With locale=en every studio-design string renders English; with locale=zh-CN, Chinese. No screen mixes both (except user data).

🤖 Generated with Claude Code

https://claude.ai/code/session_01DHQc5BdGhTzPfazex3vWdt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions