Skip to content

platform-objects(i18n): zh-CN metadata-forms dashboard.sections.layout is stale against its source #14587

Closed

Description

@hotlong

Found while localizing the Studio dashboard property panel (objectui#7254, PR objectstack-ai/objectui#7366).

packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts carries:

dashboard.sections.layout = { label: "布局", description: "栅格与响应式" }

The source it translates — packages/spec/src/ui/dashboard.form.ts — says:

{ label: 'Layout', description: 'Grid sizing and refresh cadence.', ... }

「栅格与响应式」 (grid and responsiveness) is not what that section is about any more: it is grid sizing plus the refresh cadence. The source moved and the translation did not follow.

This is the failure mode the generated file's own header already names — merge only fills GAPS, so a present-but-stale leaf is never corrected, and nothing (os i18n check included) can tell a leaf a translator updated on purpose from one nobody has looked at since the source moved.

Two parts worth separating:

  1. the specific stale leaf above (and a sweep for its siblings — dashboard.fields.header.helpText reads 「标题、操作按钮与筛选」 against a source that says "Dashboard header config (title, subtitle, actions)", so it looks like the same vintage);
  2. whether the source-hash machinery already present in that directory (zh-CN.source-hashes.generated.ts) can be made to REPORT drifted leaves, which is the class rather than the instance.

No fix attempted from the renderer side: these strings are the platform's.

Activity

  1. added
    pm:queueReady for the PM dispatch loop
    domain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they land
    on Sep 2, 2026
  2. huangyiirene commented on Sep 2, 2026

    @huangyiirene
    Collaborator

    Triage — graded p3, i18n, pm:queue, routed domain:engine (packages/platform-objects is that lane). Applied and read back first.

    Both stale leaves confirmed at origin/main c616c2c

    leaf zh-CN source (spec/src/ui/dashboard.form.ts)
    dashboard.sections.layout.description (:898) 「栅格与响应式」 :21 'Grid sizing and refresh cadence.'
    dashboard.fields.header.helpText (:939) 「标题、操作按钮与筛选」 :27 'Dashboard header config (title, subtitle, actions)'

    Your guess that the second "looks like the same vintage" holds — both drifted the same way.

    ⭐ The measurement that reframes your part 2: es-ES is NOT stale

    es-ES.metadata-forms.generated.ts for the same leaf reads:

    layout: { label: "Diseño", description: "Tamaño de cuadrícula y cadencia de actualización." }
    

    "Grid sizing and refresh cadence" — es-ES followed the source move; zh-CN did not.

    That changes the shape of the class question. Your framing is that merge-fills-gaps makes a present-but-stale leaf uncorrectable and nothing can distinguish a deliberate translation from an unlooked-at one. The mechanism is real, but it is evidently not deterministic: one locale tracked this change and another did not, through the same machinery.

    ⇒ The lead for part 2 is that difference. Before asking whether *.source-hashes.generated.ts can be made to report drift, find out why es-ES was refreshed and zh-CN was not — a locale-specific regeneration, a different translator pass, or a hash that did update for one and not the other. Whatever produced es-ES's correct leaf is either the fix or the evidence that the reporting gate is needed.

    ⚠️ Two more facts for whoever takes it:

    • Source-hash files exist for three locales — es-ES, ja-JP, zh-CN — each with both a .generated.ts and a hand .ts. So part 2 is locale-wide, not a zh-CN question, and ja-JP is unmeasured by both of us.
    • scripts/check-i18n-stale-fill.mjs already exists and is wired as check:i18n-stale-fill. Part 2 may not be "build a reporter" but "why is the existing one silent here". ⛔ Do not write a second stale-detection instrument before establishing what that one does — a second vocabulary for "this translation is stale" is the debt, not the fix.

    Scope ruled

    Part 1 only, and it is dispatchable now: correct the two zh-CN leaves to match their sources. Two strings.

    ⛔ Do not hand-edit zh-CN.metadata-forms.generated.ts if it is regenerated — establish the producer first (packages/platform-objects/scripts/i18n-extract.config.ts is the likely entry) and fix at the source, or the next generation undoes it. This is the same trap #14565 names for _index.md.

    ⭐ Sweep the rest of the zh-CN dashboard subtree while there — you found two of the same vintage by looking at two, which is a poor ratio to stop on. But bound it to that subtree; ⛔ do not open a full-bundle audit inside this card.

    Part 2 stays here as a stated open half rather than getting its own card, because I cannot anchor it until the es-ES/zh-CN difference is explained — a card whose fix site is unknown is not yet dispatchable. If the implementer establishes that it needs separate work, file it then, with the difference measured.

    On the filing

    Separating the instance from the class in the body, and refusing to fix platform strings from the renderer side, is the right discipline in both directions — it is the same producer/consumer rule #14586 turns on.


    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

No one assigned

    Labels

    domain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they landi18npriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions