From 88a0de66fab0a8acf8f6c6f5b48010b5a7aed1f6 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Wed, 22 Jul 2026 22:58:08 +0800 Subject: [PATCH] =?UTF-8?q?release(browser):=200.11.0=20=E2=80=94=20script?= =?UTF-8?q?-subtag=20locale=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consumes the changeset from PR #50. Bumps @edoxen/browser 0.10.0 -> 0.11.0 (minor: locale normalization now preserves script subtags). --- .changeset/script-subtag-locales.md | 21 --------------------- examples/bilingual/CHANGELOG.md | 7 +++++++ examples/bilingual/package.json | 2 +- examples/minimal/CHANGELOG.md | 7 +++++++ examples/minimal/package.json | 2 +- examples/multibody/CHANGELOG.md | 7 +++++++ examples/multibody/package.json | 2 +- examples/standalone/CHANGELOG.md | 7 +++++++ examples/standalone/package.json | 2 +- packages/browser/CHANGELOG.md | 25 +++++++++++++++++++++++++ packages/browser/package.json | 2 +- 11 files changed, 58 insertions(+), 26 deletions(-) delete mode 100644 .changeset/script-subtag-locales.md diff --git a/.changeset/script-subtag-locales.md b/.changeset/script-subtag-locales.md deleted file mode 100644 index 090d498..0000000 --- a/.changeset/script-subtag-locales.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@edoxen/browser': minor ---- - -Script-subtag locale support. - -`normalizeUiLocale` now preserves the script subtag instead of truncating to the first 3 chars. Composite codes like `zho-Hant`, `zh-Hans-SG`, `fr-CA` resolve to distinct buckets so consumers can register Simplified + Traditional as separate routed locales (`/zho-Hans/…`, `/zho-Hant/…`). - -`t()`, `meetingTypeLabel()`, and `isRtl()` walk a fallback chain (`zho-hant` → `zho` → English), so script-specific overrides win, the base-language built-in is the next fallback, then English. - -### Changed -- `normalizeUiLocale` — new `toCanonical` helper that handles 2-char folding (`en` → `eng`), bare 3-char passthrough, and composite codes (`zh-Hant` → `zho-hant`). -- `t()` — walks the locale chain (`localeChain(code)`) so script-bearing locales fall back to the base language before English. -- `meetingTypeLabel()` — walks the same chain for `terminology.meetingTypes` overrides. -- `isRtl()` — walks the chain so `ara-Latn` still resolves to RTL via `ara`. - -### Added -- `src/i18n/script-subtag.spec.ts` — 10 tests covering normalization, fallback, per-script override, RTL detection. - -### Migration notes -No breaking changes for existing consumers. Bare 3-char codes (`eng`, `fra`) behave identically. 2-char codes (`en`, `fr`) still fold to 3-char. The only behavioral change is that composite codes (`zho-Hant`) no longer collapse to their base — which was the documented limitation this lifts. diff --git a/examples/bilingual/CHANGELOG.md b/examples/bilingual/CHANGELOG.md index c859408..37b0d0b 100644 --- a/examples/bilingual/CHANGELOG.md +++ b/examples/bilingual/CHANGELOG.md @@ -1,5 +1,12 @@ # @edoxen/browser-example-bilingual +## 0.0.19 + +### Patch Changes + +- Updated dependencies [2448c29] + - @edoxen/browser@0.11.0 + ## 0.0.18 ### Patch Changes diff --git a/examples/bilingual/package.json b/examples/bilingual/package.json index f5e5170..3f7c6b0 100644 --- a/examples/bilingual/package.json +++ b/examples/bilingual/package.json @@ -1,6 +1,6 @@ { "name": "@edoxen/browser-example-bilingual", - "version": "0.0.18", + "version": "0.0.19", "private": true, "type": "module", "description": "Bilingual @edoxen/browser example — EN + FR content via per-field LocalizedString.", diff --git a/examples/minimal/CHANGELOG.md b/examples/minimal/CHANGELOG.md index c2b6411..a0dcf85 100644 --- a/examples/minimal/CHANGELOG.md +++ b/examples/minimal/CHANGELOG.md @@ -1,5 +1,12 @@ # @edoxen/browser-example-minimal +## 0.0.19 + +### Patch Changes + +- Updated dependencies [2448c29] + - @edoxen/browser@0.11.0 + ## 0.0.18 ### Patch Changes diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 6f64ab9..61605ba 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -1,6 +1,6 @@ { "name": "@edoxen/browser-example-minimal", - "version": "0.0.18", + "version": "0.0.19", "private": true, "type": "module", "description": "Minimal @edoxen/browser example — single-locale, decisions-only.", diff --git a/examples/multibody/CHANGELOG.md b/examples/multibody/CHANGELOG.md index e51fae7..1f5a278 100644 --- a/examples/multibody/CHANGELOG.md +++ b/examples/multibody/CHANGELOG.md @@ -1,5 +1,12 @@ # @edoxen/browser-example-multibody +## 0.0.19 + +### Patch Changes + +- Updated dependencies [2448c29] + - @edoxen/browser@0.11.0 + ## 0.0.18 ### Patch Changes diff --git a/examples/multibody/package.json b/examples/multibody/package.json index 0e9d19b..ad4d2f4 100644 --- a/examples/multibody/package.json +++ b/examples/multibody/package.json @@ -1,6 +1,6 @@ { "name": "@edoxen/browser-example-multibody", - "version": "0.0.18", + "version": "0.0.19", "private": true, "type": "module", "description": "Multi-body @edoxen/browser example — CIML + Conference + DC badges.", diff --git a/examples/standalone/CHANGELOG.md b/examples/standalone/CHANGELOG.md index 0def5ca..2330f9c 100644 --- a/examples/standalone/CHANGELOG.md +++ b/examples/standalone/CHANGELOG.md @@ -1,5 +1,12 @@ # @edoxen/browser-example-standalone +## 0.0.19 + +### Patch Changes + +- Updated dependencies [2448c29] + - @edoxen/browser@0.11.0 + ## 0.0.18 ### Patch Changes diff --git a/examples/standalone/package.json b/examples/standalone/package.json index 58bbb60..b253309 100644 --- a/examples/standalone/package.json +++ b/examples/standalone/package.json @@ -1,6 +1,6 @@ { "name": "@edoxen/browser-example-standalone", - "version": "0.0.18", + "version": "0.0.19", "private": true, "type": "module", "description": "Standalone-mode @edoxen/browser showcase — no astro.config: edoxen.config.ts + data + src/styles/override.css theming demo.", diff --git a/packages/browser/CHANGELOG.md b/packages/browser/CHANGELOG.md index 16446a5..27d09f1 100644 --- a/packages/browser/CHANGELOG.md +++ b/packages/browser/CHANGELOG.md @@ -1,5 +1,30 @@ # @edoxen/browser +## 0.11.0 + +### Minor Changes + +- 2448c29: Script-subtag locale support. + + `normalizeUiLocale` now preserves the script subtag instead of truncating to the first 3 chars. Composite codes like `zho-Hant`, `zh-Hans-SG`, `fr-CA` resolve to distinct buckets so consumers can register Simplified + Traditional as separate routed locales (`/zho-Hans/…`, `/zho-Hant/…`). + + `t()`, `meetingTypeLabel()`, and `isRtl()` walk a fallback chain (`zho-hant` → `zho` → English), so script-specific overrides win, the base-language built-in is the next fallback, then English. + + ### Changed + + - `normalizeUiLocale` — new `toCanonical` helper that handles 2-char folding (`en` → `eng`), bare 3-char passthrough, and composite codes (`zh-Hant` → `zho-hant`). + - `t()` — walks the locale chain (`localeChain(code)`) so script-bearing locales fall back to the base language before English. + - `meetingTypeLabel()` — walks the same chain for `terminology.meetingTypes` overrides. + - `isRtl()` — walks the chain so `ara-Latn` still resolves to RTL via `ara`. + + ### Added + + - `src/i18n/script-subtag.spec.ts` — 10 tests covering normalization, fallback, per-script override, RTL detection. + + ### Migration notes + + No breaking changes for existing consumers. Bare 3-char codes (`eng`, `fra`) behave identically. 2-char codes (`en`, `fr`) still fold to 3-char. The only behavioral change is that composite codes (`zho-Hant`) no longer collapse to their base — which was the documented limitation this lifts. + ## 0.10.0 ### Minor Changes diff --git a/packages/browser/package.json b/packages/browser/package.json index 1ef5cf3..8b359f1 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@edoxen/browser", - "version": "0.10.0", + "version": "0.11.0", "description": "Astro-based browser for edoxen YAML data — drop in your data and ship a resolutions archive site.", "type": "module", "license": "BSD-2-Clause",