Skip to content

Commit 4f96f9a

Browse files
committed
docs(changeset): resolveOfferedLocale answers through the same ladder
Claude-Session: https://claude.ai/code/session_01L6bhgXFwZkpwurAYNxGpAb Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6f32f31 commit 4f96f9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/30538-locale-table-read-aliases.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Metadata-protocol: semantic
1212

1313
What changes for a reader: a request for `zh-TW`, `zh-HK` or `zh-MO` reaches a registered `zh-Hant` key, and `zh`, `zh-CN`, `zh-SG` or `zh-Hans` reaches `zh-CN` (or `zh-Hans`), whatever order the bundle registered them in. Before, the first registered `zh-*` key answered both, so a Traditional reader got the Simplified bundle (and with `zh-Hant` registered first, a Simplified reader got the Traditional one). A bare `zh` key now counts as Simplified for a `zh-TW` request, which the base-language step used to hand it. The step also applies to `ja` → `ja-JP`, `es` → `es-ES`, `en` → `en-US` and `pt` → `pt-BR`, which answer as before against today's alias-spelled bundles.
1414

15-
`resolveOfferedLocale` (`@objectstack/core`, the matcher Setup's default language and the IdP locale claim use) is now the same function, so where an offered list holds two codes of one table language it answers the one spelled as the table tag (`zh-Hans` over `zh-CN`, `zh-Hant` over `zh-TW`) instead of the first listed.
15+
`resolveOfferedLocale` (`@objectstack/core`, the matcher Setup's default-language options and the IdP locale claim use) now answers through the same ladder, so a Traditional request reaches an offered `zh-Hant`. Where a list offers two codes of one table language, the code spelled as the table tag wins over the first one offered: `zh` over `['zh-CN', 'zh-Hans']` answers `zh-Hans`, and `zh-HK` over `['zh-TW', 'zh-Hant']` answers `zh-Hant`.
1616

1717
Unchanged: a code the table does not know (`es-MX`, `en-GB`, `pt-PT`) falls back through base language and variant expansion exactly as before, and a `zh-TW` request still reaches `zh-CN` when no Traditional key is registered. No call that matched before stops matching. Every caller of these functions moves with them, among them the i18n REST door, built-in validation and operation messages, email template locale folding, hook, flow and approval copy, and plugin-auth's refusal copy.

0 commit comments

Comments
 (0)