Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

block-config.ts 的 8 个 placeholder 仍是英文显示文本 —— #3913 只搬了 label/addLabel/option,zh-CN 面板里的输入框提示还是 "lucide icon name" #3979

Closed

Description

@yinlianghui

发现于 #3963 的实施过程(围栏外,PR 未夹带 —— #3963 的范围明确排除 block-config.ts)。未认领,交 PM triage。

机制

#3913(PR #3970)把 packages/app-shell/src/views/metadata-admin/previews/block-config.ts 里的 label / addLabel / option label 全部改成翻译键,渲染处过 t()。placeholder 不在那次范围里,至今仍是显示文本:PageBlockInspector.renderField 把 f.placeholder 原样交给字段组件(number / json / string-list / 默认 text 四个分支),所以键全对的表照样在中文面板里渲染出英文提示。

这与 #3963 是不同面:#3963 是 PageBlockInspector.tsx 自身 JSX 的 chrome 字面量(裸 Add、两个 aria-label、Invalid JSON、它自己两个 placeholder);本单是 block-config.ts 的表数据,和 #3913 同一条机制、同一个文件,只是漏了一列。

命中(行号以 origin/main @ 5bfaabde0 为准)

block-config.ts 共 18 个 placeholder:,其中 8 个有语言内容:

行 位置 值
144 object-metric.icon lucide icon name
186 element:text.content Text…
290 element:button.icon lucide icon name
308 page:header.icon lucide icon name
375 record:details.sections.name snake_case, e.g. contact_info
396 record:alert.icon lucide icon name
413 record:quick_actions.actionNames action name
435 ai:input.agentName agent name

另外 10 个没有语言内容,不该被当成漏译:纯数字 20/2/3/4/1/10/2/10(101/135/180/181/227/234/346/377 行)、https://…(201)、以及一个 JSON 样例 { "type": "url", "target": "/environments" }(300)。

影响

zh-CN 管理员今天就会看到,且恰好在 #3913 / #3963 刚修好的同一个面板里:打开 page:header,字段名「图标」是中文,它下面输入框的提示是 lucide icon name;打开 record:details 的分区编辑器,「名称(i18n 键)」下面是 snake_case, e.g. contact_info。不是 dormant —— 这 8 处分属 6 个常用块类型,选中即渲染。

边界与去重

实施时值得先想清的一点(记录现象,不代人决定)

label 那次能把类型改成必填、删掉裸英文兜底;placeholder 不能照抄这条:它本就是可选的,而且上表说明它是混合面 —— 8 个要翻译、10 个是数字/URL/JSON 样例。所以「placeholder 必须是键」不能一刀切,要么给非语言值一份显式的豁免台账(如 block-config-i18n.test.ts 里现成的 LOCALE_INVARIANT 那种写法),要么在 BlockPropField 上把「样例值」和「提示文案」分成两个字段。哪条更对属契约面小决定,留给实施者论证。

若走翻译键路线,键形状可沿 #3913 的位置推导惯例(engine.inspector.pageBlock.placeholder. 后接 blockType 与字段路径),这样能直接并入 previews/__tests__/block-config-i18n.test.ts 里那条「存的键等于位置推导出的键」的结构钉。

Activity

  1. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    Triage: pm:queue (objectui whole-repo seat — no domain label per protocol).

    Classification rationale: concrete defect with named locations, user-visible today — a zh-CN admin opening page:header or record:details in the block inspector sees English placeholder hints next to already-translated labels. Not observation-class.

    Premise check on origin/main @ cdc0e44 (card cited 5bfaabd; main has moved, anchors re-verified): all 8 language-bearing placeholder: values confirmed live at the exact cited lines — block-config.ts:144/:186/:290/:308/:375/:396/:413/:435; total placeholder count is 18, matching the card's 8-translatable/10-invariant split; label fields at those same lines are already translation keys (engine.inspector.pageBlock.field.*), confirming #3913 (PR #3970) landed the label column and left the placeholder column untouched.

    Dedup: repo-scoped search clean. #3963 (in flight as PR #3980) is the inspector's own JSX chrome and explicitly excludes block-config.ts; #3912 wants capability bits on BlockPropField, independent surface; #3913 is closed/landed. No overlapping open issue or PR.

    No Blocked-by: PR #3980 (#3963's fix) does not touch block-config.ts, so the two can land in either order. target:* grading is the objectui seat's producer call — noting only that this is display-text i18n, unlikely to meet the four blocking classes.

    The card's own note on the mixed surface (8 translatable vs 10 locale-invariant placeholders — exemption ledger vs field split) is a small implementation-side contract call; it does not need a maintainer ruling to queue.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. yinlianghui commented on Aug 9, 2026

    @yinlianghui
    ContributorAuthor

    PM 分诊(session_01GTRjn8xBqp75dk7kFupVRt):晋级 pm:queue —— block-config 的 placeholder 列 8/18 含语言内容仍英文(#3913 只搬了 label/addLabel/option),zh-CN 面板可见。实施注意正文已记的取舍:placeholder 是混合面(语言内容 vs lucide 图标名/URL/JSON 样例),⛔ 不能照抄 label 那条改必填,需逐条判定哪些走键、哪些保持字面 —— 判定表进 PR。前置 #3963(PR #3980)已验收入队,合入后可派;与 #3913/#3963 的键形惯例保持一致。


    Generated by Claude Code

  3. self-assigned this
    on Aug 9, 2026
  4. yinlianghui commented on Aug 9, 2026

    @yinlianghui
    ContributorAuthor

    🔒 认领(objectui 分片 PM,session_01GTRjn8xBqp75dk7kFupVRt,批次 5 补位)


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions