From d9c1c6b4fb7f49c04fa20511bcad2d0910b9db91 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 22:01:21 +0000 Subject: [PATCH] docs(skills): teach the five-step locale ladder resolveLocaleAmong runs The objectstack-i18n skill still taught the in-memory fallback's old four-step ladder. Both server resolvers now share resolveLocaleAmong, which maps the request through the platform locale table between the case-insensitive and base-language steps, so zh-TW reaches a registered zh-Hant bundle. The sentence now names the five steps in code order, names resolveLocaleAmong, and gives the zh-TW to zh-Hant example. Claude-Session: https://claude.ai/code/session_016WV4czZcAEZpkY6CfBWJY7 Co-authored-by: Claude --- .changeset/30603-i18n-skill-locale-ladder.md | 8 ++++++++ skills/objectstack-i18n/SKILL.md | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/30603-i18n-skill-locale-ladder.md diff --git a/.changeset/30603-i18n-skill-locale-ladder.md b/.changeset/30603-i18n-skill-locale-ladder.md new file mode 100644 index 00000000000..1a17def59b5 --- /dev/null +++ b/.changeset/30603-i18n-skill-locale-ladder.md @@ -0,0 +1,8 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): objectstack-i18n teaches the five-step locale ladder that `resolveLocaleAmong` runs (exact, case-insensitive, same platform-table language, base language, first registered variant), so a `zh-TW` request is taught to reach a registered `zh-Hant` bundle rather than the first `zh-*` one + +Clause-②: no +Metadata-protocol: none diff --git a/skills/objectstack-i18n/SKILL.md b/skills/objectstack-i18n/SKILL.md index d1a68b281bc..ec6f31df5a9 100644 --- a/skills/objectstack-i18n/SKILL.md +++ b/skills/objectstack-i18n/SKILL.md @@ -373,8 +373,10 @@ registers when no i18n plugin is present): plugins can each contribute their own `objects.*` slice - **`getLocales()`** / **`setSupportedLocales()`** / **`getDefaultLocale()`** / **`setDefaultLocale()`** -The in-memory fallback additionally resolves locale codes -(exact → case-insensitive → base language `zh-CN` → `zh` → variant `zh` → `zh-CN`). +The in-memory fallback additionally resolves locale codes through `resolveLocaleAmong` +(`@objectstack/spec/system`), the one ladder `resolveBundleLocale` also runs: exact → +case-insensitive → same platform-table language (`zh-TW` → `zh-Hant`) → base language +`zh-CN` → `zh` → first registered variant `zh` → `zh-CN`. The contract also declares optional methods — `getFieldLabels`, `getCoverage`, `suggestTranslations` — that **no shipped implementation provides**. Treat them