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.

页面块检查器的 PROPERTIES 面在 zh-CN 会话下是英文的 —— curated 字段 label 走字面量、只有外围章节标题走 t() #3913

Closed

Description

@yinlianghui

发现于 #3819 的实施过程(围栏外,PR #3911 未夹带)。未认领,交 PM triage。

机制

PageBlockInspector 的外围 chrome 全部走翻译表:

{t('engine.inspector.pageBlock.properties', locale)}
{t('engine.inspector.pageBlock.advanced', locale)}
{t('engine.inspector.pageBlock.visibleWhen', locale)}

但这个面板的内容——每个块类型的 curated 字段——的 label 来自 previews/block-config.ts 里的字面量,renderField 原样交给 InspectorTextField:

{BLOCK_CONFIG[block.type as string].map((f) => renderField(f, readProp, patchProp))}

renderField 里是 label={f.label},没有经过 t()。block-config.ts 里 100 多个 label(Object、Columns、Fields、Sections、Severity、Dismissible…)以及 addLabel(Add section、Add item)都是硬编码英文,metadata-admin/i18n.ts 里也没有对应键(比对过:i18n.ts 有 designer.canvas.addSection 给表单布局画布用,但块检查器这条路上一个都没有)。

所以在 zh-CN 会话里,这个属性面板呈现为:章节标题「属性」是中文,底下每一格的名字是英文。同一个面板里两种语言。

影响

zh-CN 管理员今天就会看到 —— 打开任意页面块的检查器即可复现,不需要特殊数据。不是 dormant,也不是纯装饰:这是本仓 i18n 纪律(参见刚落地的 #3837)在设计器内容面上的一个空洞。

边界与去重

一处取舍提醒

BLOCK_CONFIG 是一张 curated 表,label 与 spec 的 property 名一一对应;做 i18n 时要决定键的形状(按 block-type.prop 还是复用 spec 侧已有的 label 翻译),这属于契约面决定,所以本单只记录现象,不预设改法。

参考位置

  • packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.tsx —— renderField(label={f.label},未过 t())与外围 t('engine.inspector.pageBlock.*') 的对比
  • packages/app-shell/src/views/metadata-admin/previews/block-config.ts —— 全部字面量 label / addLabel
  • packages/app-shell/src/views/metadata-admin/i18n.ts —— 翻译表(不含这些键)

关联:#3819 / PR #3911(新增的 Name (i18n key) label 沿用了本文件既有的英文字面量惯例,没有单独破例)、#3134(邻域另一个设计面)

Activity

  1. claude commented on Aug 9, 2026

    @claude
    Contributor

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

    • Classification basis: concrete, user-visible defect — a zh-CN admin opening any page-block inspector sees the section headers translated but every curated field label in English. Reproduces with no special data.
    • Anchor verification on origin/main @ 2937bcf: PageBlockInspector.tsx passes label={f.label} untranslated at 8 render sites (:394/:400/:417/:426/:490/:496/:502/:507) while chrome goes through t('engine.inspector.pageBlock.*') (:588); previews/block-config.ts carries 163 label: literals plus addLabel: 'Add section' (:292/:332); metadata-admin/i18n.ts has no keys for these (only designer.canvas.addSection :992/:2584, which serves the form-layout canvas). All claims in the body hold as filed.
    • Dedup: repo-scoped search for PageBlockInspector finds only 页面块检查器的 BlockPropField 没有格式/校验能力位 —— 所有标识符类字段(section name、tab key、accordion value)只能靠 placeholder 陈述约定 #3912 (capability bits for BlockPropField — different defect, same file) and this card. [Studio i18n] 表单布局设计器未解析已有的对象字段和分组翻译 #3134 is the form-layout designer i18n surface — adjacent, not a duplicate; kept as cross-reference.
    • The i18n key-shape choice (per-block keys vs reusing spec-side label translations) noted in the body is implementation-level; the implementing dev can propose it in the PR — no maintainer decision required to start.

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


    Generated by Claude Code

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

    @yinlianghui
    ContributorAuthor

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


    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