Repository navigation
feat(ui): the translation preview strings move into the studio i18n namespace (#25922 slice S6b) - #27083
Conversation
… namespace The 22 en and 22 zh engine.translationPreview rows, the last family in app-shell's designer table, move into @object-ui/i18n's studio namespace with their text unchanged. ENGINE_STRINGS_EN / ENGINE_STRINGS_ZH stay declared, now empty, for the slice that retires the table. The namespace pin gains a floor for the moved family. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
The designer table's floor was "non-empty"; with its last rows moved into the studio namespace it now asserts both tables are empty, so a key moved back would shadow the namespace. The 3,000-key floor over both homes keeps the parser's non-vacuity. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
… language Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
席位核对ACCEPT · seat 席位意见:第六片补遗把设计器私有表里最后的
Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40638669564 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Warren · project thread
Part of #25922
Clause-②: no
Metadata-protocol: none
维护者速读
engine.translationPreview.*(en、zh 各 23 行,含 feat(spec): a hook declares its refusal catalogue, and its body refuses by code, answered in the caller's language #26831 加的category.hooks)搬进@object-ui/i18n的studio命名空间,文案一字未改;ENGINE_STRINGS_EN/ENGINE_STRINGS_ZH现在是空对象,声明保留到 S7。check:i18n-designer-parity及其ci.yml步骤)。ui/packages/i18n/src/namespaces/studio/zh.ts末尾的 S6b 段,再看block-config-i18n.test.ts里改成「两张表为空」的断言。cd ui && pnpm run check:i18n-designer-parity && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts,应全绿。What changes
ENGINE_STRINGS_EN/ENGINE_STRINGS_ZH(ui/packages/app-shell/src/views/metadata-admin/i18n.ts),engine.translationPreview.*, is appended toSTUDIO_EN/STUDIO_ZHinui/packages/i18n/src/namespaces/studio/{en,zh}.tsunder an S6b heading comment, text byte-for-byte unchanged, its group comment moving with it. That is 23 rows in each language, not the 22 the order counted: feat(spec): a hook declares its refusal catalogue, and its body refuses by code, answered in the caller's language #26831 (merged before this branch) addedengine.translationPreview.category.hooks, and this PR carries it.ENGINE_STRINGS_*declarations stay, as the order requires, each holding a two-line comment that says where the rows live and that slice S7 retires the table.t()/tOptional(),lookupString,TYPE_LABELS/DOMAIN_LABELS,FLOW_FIELD_ZHandcheck:i18n-designer-parityare untouched.lookupStringasks the empty table first and the namespace second, soTranslationPreview.tsxand its tests read the same strings with no edit. The preview's locale comes from its host'suseMetadataLocale(), which already subscribes to the lazyzhcatalogue.previews/__tests__/block-config-i18n.test.ts, case "reads two disjoint, non-empty tables out of i18n.ts", floored each table at non-empty. It now asserts both tables are empty (a key moved back would shadow the namespace) and keeps its range-disjointness check and its 3,000-key floor over both homes, which is what keeps an empty table from reading as a parser gone quiet. The case name says "both emptied into the namespace"..changeset/25922-studio-i18n-translation-preview.md,@object-ui/i18npatch.ui/packages/i18n/src/locales/*.ts,ui/.github/**, rootci.yml,ui/scripts/check-i18n-designer-table-parity.mjs.Why
Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table becomes one lazy
@object-ui/i18nnamespace, moved in slices. This family was held out of S6 while #26831 was open.Tests
inspectors/inspectorStrings.studioNamespace-25922.test.tsgains a floor of 20 forengine.translationPreview.(87 families in all). Every key in the family must be inzhand resolve throught()to the namespace value inen-US,zh-CNandde-DE.f708cf22and at this head. In each language: table 23 → 0, namespace 3,186 → 3,209 (en) and 3,240 → 3,263 (zh); removed set equals added set, 0 values differing, 0 keys in both homes, 0 existing namespace rows dropped or changed.f708cf22, compared witht(),tOptional()andtFormat()on this branch withzhresident, inen-US,en,de-DE,fr, no locale,zh-CN,zhandzh-TW: 552 lookups, 0 differing.scripts/ablation-replace.mjs; mutation landed by anchor count and blob, restored to theHEADblob withgit diff HEADempty):zhrowengine.translationPreview.coverageplanted back inENGINE_STRINGS_ZHwith another value: the pin'st()case forengine.translationPreview.goes red, and the equivalence check reports exactly 9 differing lookups (t/tOptional/tFormat×zh-CN,zh,zh-TW).studio/zh.ts: the pin's family case andt()case go red, and the equivalence check reports the same 9.The sweep
The
zhloader innamespaces/studio/index.tswas delayed by 4,000 ms (ablation-replace.mjs --hold, restored to theHEADblob). Under the delay, every app-shell test namingzhor a moved key plus the i18n tests namingstudioran (310 files): 3,617 of 3,618 tests passed. The one red isi18n/src/__tests__/studio-namespace-lazy.test.tsx, red by construction (itsfindByTextwaits 1 s against a 4 s delay). No racer. Then each.test.tsfile that names a moved key or reads the table (6 files: the pin,block-config-i18n,zh-base-term.i18n-13131, and the dead-keys, designer-parity and en-drift script tests) ran alone, delayed: all green.Acceptance notes
check:i18n-designer-parityexits 0 and reportsENGINE_STRINGS 3209 en / 3263 zh, the same totals as onf708cf22, because its extractor reads the table and the namespace as one table. The AST extractor accepts an empty object literal; the line-range extractor inblock-config-i18nand theindexOfreader inzh-base-term.i18n-13131both need the closing};on its own line, which is why the empty declarations keep the multi-line form.f708cf22(claim 6460205408).Build & E2E UImeasures it.Verification
At
13e08033.origin/mainis 3 commits ahead (#27034, #27031, #27066); none touches either home, the namespace or an i18n gate, andgit merge-treeis clean.Tests and gates
pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: exit 0.pnpm --dir ui run type-check:scripts: exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 commands, each exit 0 (captured before any pipe), includingpnpm --dir ui exec vitest run scripts/(Test Files 176 passed | 2 skipped (178)).--ran: 34 derived, 34 run, 0 NOT-MEASURED.check:i18n-designer-parity,check:i18n-dead-keys,check:i18n-drift("No en value changed in this range."),check:i18n-keys: exit 0.check:new-line-citations: exit 0 (0 new).node scripts/check-nul-bytes.mjs: exit 0.TranslationPreviewreaders,zh-base-term,block-config-i18n, the parity and dead-keys script tests,studio-namespace, equivalence):Tests 451 passed (451).Human Minimum
packages/specchange.pnpm lintis CI's.main, one pull request.Generated by Claude Code