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