Repository navigation
docs(skills): objectui i18n guide keys the built-in packs by platform locale tag (zh-Hans, zh-Hant, pt-BR) - #31043
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
… locale tag The guide still taught the retired `zh` and `pt` pack keys after the Console's packs moved to the platform locale table. It now lists the eleven table tags, keys the setup example by `zh-Hans`, feeds the switcher from `PLATFORM_LOCALES`, and says which stored codes keep resolving through the table's read aliases. Paid for by deleting restatement in the same file: the intro line (package named by every import), the inline navigator comment, the `direction` re-destructure fence (shown in the hook example), and the lazy-loading common-mistake bullet (its own section). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAjteesTptAwhHn3GuE
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract-review-claim: session_01J8VVAj7CvjkGXvgXzd6RZ7 · head 291ef83 · 2026-11-06T20:14Z The seat review runs at CONTRACT_REVIEW_TIER in an isolated subagent. No review seat ( |
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract reviewServed-tier: Inputs: card #30911 body and its 2 comments (triage, claim); PR #31043 body and file list (2 files, +19 −17); the net diff ① Derived judgmentsEvery tag, key, path, API name and behaviour the guide now teaches, against
The four restatement deletions:
No statement in the diff is false, and no unique fact was lost. ② Semver level
Both lines appear line-initial in the PR body and in the changeset body. ③ Boundary flags
④ Design judgment
Findings: must-fix none; should-fix S1 (the switcher's Implemented-by: VERDICT: PASS |
… it runs in a stored alias
An instance can run in a stored code such as `zh` or `zh-CN`; the
switcher's `value={language}` then matched no option and the select
showed English over a Chinese page. It now selects
`resolveBuiltInLanguage(language) ?? language`.
Paid for by deleting the responsive-page section's intro sentence,
which restates its heading and the fence's `@object-ui/mobile` import.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAjteesTptAwhHn3GuE
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract-review-claim: session_01J8VVAj7CvjkGXvgXzd6RZ7 · head 450d724 · 2026-11-06T20:36Z Delta review against the PASS at head 291ef83 (comment 6694588461, should-fix S1). The delta is one commit answering S1 (the switcher's |
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract reviewServed-tier: This is a delta review of round 1 (PASS at
① Derived judgments
② Semver levelThe changeset is unchanged since round 1, and the delta is skill prose only. ③ Boundary flags
④ Design judgment
Findings: must-fix none; should-fix none (round 1's S1 resolved in Implemented-by: VERDICT: PASS |
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 维护者速读
席位核对 — ACCEPT · domain:skills#3 · head
|
Requested by Irene · project thread
Fixes #30911
Clause-②: no
Metadata-protocol: none
维护者速读
skills/objectui/guides/i18n.md不再教已退役的zh/pt语言包键:内置语言改为平台语言表PLATFORM_LOCALES的 11 个标签(en、zh-Hans、zh-Hant、es、ar、fr、pt-BR、ru、de、ja、ko)及模块路径@object-ui/i18n/locales/<tag>;setup 示例改用'zh-Hans'键;语言切换器改为遍历PLATFORM_LOCALES,不再手写列表,且以resolveBuiltInLanguage(language) ?? language选中当前语言(实例以已存别名如zh运行时也能选中);说明已存的zh/zh-CN/zh-TW/pt经语言表的读别名(resolveBuiltInLanguage)继续解析。zh/pt改名为zh-Hans/pt-BR并新增zh-Hant,照旧指南写的键和 import 在main上不再解析,也提供不了繁体中文。ui/packages/i18n/src/locales/registry.ts和packages/spec/src/system/platform-locales.ts。node scripts/check-skills-token-ratchet.mjs,预期 exit 0,skills/objectui/guides/i18n.md读数 1411/1413。skills/**属 Tier H,需要os-zhuang或hotlong批准。What changes
Every tag, path and alias the guide now states was read on
main(3fe5f2a02, after PR #30902 at5bca14fc):mainpackages/spec/src/system/platform-locales.tsROWS;ui/packages/i18n/src/locales/registry.tsLAZY_LOCALE_LOADERS(typed onPlatformLocaleTag) andBUILT_IN_LANGUAGE_CODES;locales/index.tsbuiltInLocales("there is nozhorptkey")@object-ui/i18n/locales/<tag>ui/packages/i18n/package.jsonexport./locales/*; afterpnpm build,dist/locales/zh-Hans.js,zh-Hant.js,pt-BR.js(+.d.ts) existzh/zh-CN→zh-Hans,zh-TW→zh-Hant,pt→pt-BRPLATFORM_LOCALE_READ_ALIASES, read byresolveBuiltInLanguage(registry.ts) throughplatformLocaleTagOfplatform-locales.ts: read aliases are "Reads only: a new write uses the table tag itself"PLATFORM_LOCALES(tag,label)PlatformLocaleinterface, exported from@objectstack/spec/systemvalue={resolveBuiltInLanguage(language) ?? language}zhfrom a stored choice viaresolveBootstrapConfig, a seededzh-CNviaresolveSeedLanguage);resolveBuiltInLanguageis exported from the package entry (ui/packages/i18n/src/index.ts)The switcher fence is
os:check-marked and compiles against the built types:pnpm --dir ui run check:skill-examplesexit 0,--listshowsi18n.md:38 marked pass(the@objectstack/spec/systemimport resolves). The unmarked setup fence's only--measureerror is the pre-existingAppContentfragment name; the'zh-Hans'key type-checks.The inline-map section (L133 on) is untouched: its
zh-CNkeys are still valid inline-map keys and it needs nozh-Hantexample to stay correct.Evals swept:
skills/objectui/evals/i18n.jsonhas no case grading azh/ptpack key or path. Its onezhstring,must_not_contain: "import zh from './zh.json'", grades an app's own JSON import, not the retired built-in key, so it is left as is.Token budget
node scripts/check-skills-token-ratchet.mjs:skills/objectui/guides/i18n.md1413 → 1411 (5652 → 5643 bytes; ceiling 1413, unchanged, headroom 2). Bundle total 228257 → 228255. No ratchet raise;scripts/check-skills-token-ratchet.mjsis not touched.Growth paid by deleting restatement in the same file, each with its surviving home:
@object-ui/i18n." Home: the H1 and every fence'simport … from '@object-ui/i18n'(first at Setup).// Auto-detect from navigatorondetectBrowserLanguage: true. Home: the option's own name (and its doc onI18nConfig.detectBrowserLanguageinui/packages/i18n/src/i18n.ts).const { direction } = useObjectTranslation(); // direction: 'ltr' | 'rtl'. Home: the useObjectTranslation hook example, which destructuresdirectionand applies it (<header dir={direction}>); the RTL prose ("The provider updatesdocument.dir…") stays.@object-ui/mobilefor responsive layouts:". Home: the section heading ("responsive page") and the fence'simport { useBreakpoint } from '@object-ui/mobile'.Review round 1 (contract review PASS at
291ef83d8, comment 6694588461): S1 fixed in delta commit450d72405. The switcher's controlledvaluenow resolves a stored alias to its table tag, so an instance running inzhorzh-CNselects 简体中文 instead of falling to the first option. Its +60 bytes are paid by deletion 5. The out-of-scope LocaleSwitcher finding is removed from this body: the seat files it as its own card.Review tier
dispatch-gatesmandates the contract-review tier forskills/**(clause ①); waived by the maintainer's standing order in this project (2026-11-03). The seat runs the contract review.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon head450d72405(2 paths vs merge base9d939c582): 45 commands (the same list as round 1), each run undertimeout 900withNODE_OPTIONS=--max-old-space-size=8192(raised from the cloud container default heap), exit code captured before any pipe → 45 × exit 0.pnpm --filter @objectstack/spec run check:skill-examplesfirst exited 3 (NOT MEASURED: the spec build predated the rebase onto9d939c582); afterpnpm --filter @objectstack/spec buildit exited 0, and that is the recorded code.--ranreconciliation:45 derived famil(ies) accounted for — 45 run, 0 NOT-MEASURED. Extra, not derived but run by CI (ci.yml):pnpm --dir ui run check:skill-examples→ exit 0 after the spec rebuild;--listshowsi18n.md:38 marked passwith the new import. Round 1 at291ef83d8was also 45 × exit 0 after a fullpnpm build(119/119).origin/mainhas since gainede396095b6(ui/packages/typesonly, disjoint), so no merge was needed.node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD→ exit 0 before each push.Ran list
🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAjteesTptAwhHn3GuE