You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7228816
Browse filesBrowse the repository at this point in the historyBrowse files
fix(i18n): prefer the session's own script when an inline label map holds both Chinese scripts
pickLocalized and its write-side twin localeWriteKey now share one
limb function that, for a language the platform locale table splits by
script (zh-Hans / zh-Hant), prefers a key meaning the session's own
table tag (read through platformLocaleTagOf) before falling back to the
first sibling. The spec twin resolveI18nLabel takes the same limb so the
parity between the two resolvers holds. Maps without a same-script entry
and every other language resolve exactly as before.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxSGAjHBvjATmenUGp
fix(i18n): a Traditional Chinese session reads and edits the Traditional entry of an inline label map
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
`pickLocalized`, `setLocalized` and `clearLocalized` now prefer an entry of the session's own script where the platform locale table splits a language by script. In a `zh-Hant` (or `zh-TW`, `zh-HK`) session, a label written as `{ en: 'Customer', 'zh-CN': '客户', 'zh-TW': '客戶' }` shows `客戶` and an edit replaces the `zh-TW` entry; before, both took the first `zh-*` key in authoring order, so a Traditional session showed the Simplified text and an edit overwrote it. A `zh-Hans`, `zh-CN` or bare `zh` session prefers the Simplified entry the same way.
11
+
12
+
Which tag a key means comes from `platformLocaleTagOf` in `@objectstack/spec/system`, and the preference applies only to a language the table names more than once (`zh` today). A map without an entry of the session's script, and every other language, resolve exactly as before. What an author can write is unchanged.
fix(spec): `resolveI18nLabel` prefers an inline label entry of the locale's own script
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Where the platform locale table splits a language by script (`zh-Hans`, `zh-Hant`), `resolveI18nLabel` now reads an entry of the requested locale's script before an entry of the other one: `zh-Hant`, `zh-TW` or `zh-HK` over `{ 'zh-CN': '客户', 'zh-TW': '客戶' }` answers `客戶` in any authoring order, and `zh`, `zh-CN` or `zh-Hans` answers `客户`. It used to take the first `zh-*` key. The script a key means is read from `platformLocaleTagOf`. A map without an entry of the locale's script, and every language the table names once, resolve exactly as before. This keeps the resolver limb for limb with objectui's `pickLocalized`, which takes the same change. The `InlineLocaleMapSchema` keys an author can write are unchanged.
0 commit comments