@@ -35,8 +35,9 @@ import { strictObject } from '../shared/strict-object';
3535 *
3636 * Named because those two roles are the same fact and authors keep reading it
3737 * as neither. Over the built-in registry template loader the resolver folds a
38- * named locale against the bundle's own tags (exact, case-insensitive, base
39- * language, variant expansion) and then tries the stack's declared fallback
38+ * named locale against the bundle's own tags (exact, case-insensitive,
39+ * platform locale table language, base language, variant expansion) and then
40+ * tries the stack's declared fallback
4041 * (`i18n.fallbackLocale`, else `defaultLocale`) folded the same way, so an `en`
4142 * row is reached, absent a row of their own, from `en-GB`, and from any tag on
4243 * a stack whose declared fallback is `en`. This literal is the one rung that
@@ -178,12 +179,14 @@ export const EmailTemplateDefinitionSchema = lazySchema(() => strictObject({
178179 * (`IEmailService.sendTemplate`) reads one row at one tag **exactly**, rung
179180 * by rung; what it folds is the tag it asks for (#28880). For a call that
180181 * NAMES a locale, over the built-in registry template loader, it folds that
181- * locale against the bundle's own tags (exact, case-insensitive, base
182- * language, then variant expansion, the first match in ascending tag order),
182+ * locale against the bundle's own tags (exact, case-insensitive, platform
183+ * locale table language, base language, then variant expansion, the first
184+ * match in ascending tag order),
183185 * then folds the stack's declared fallback locale (`i18n.fallbackLocale`,
184186 * else `defaultLocale`) the same way, then tries the literal
185187 * {@link EMAIL_TEMPLATE_FLOOR_LOCALE}. So, absent a row of their own, `en-GB`
186- * and `en-US` reach an `en` row and `zh-TW` reaches `zh-CN`, while `fr`
188+ * and `en-US` reach an `en` row and `zh-TW` reaches `zh-Hant` (else
189+ * `zh-CN`), while `fr`
187190 * reaches an `en` row only through the declared fallback.
188191 *
189192 * ⚠️ `en-US` is still the bundle's FLOOR: the one rung that holds whatever
@@ -221,8 +224,9 @@ export const EmailTemplateDefinitionSchema = lazySchema(() => strictObject({
221224 'BCP-47 locale (e.g. en-US, zh-CN) — the bundle key. Each rung of the resolver reads one row at '
222225 + 'one tag exactly, so `en` and `en-US` are different ROWS of one bundle. A call that NAMES a '
223226 + "locale, over the built-in template loader, folds it against the bundle's tags (exact, "
224- + 'case-insensitive, base language, then variant expansion: `en-GB` reaches `en`, `zh-TW` '
225- + "reaches `zh-CN`), then folds the stack's declared fallback locale (`i18n.fallbackLocale`, "
227+ + 'case-insensitive, platform locale table language, base language, then variant expansion: '
228+ + '`en-GB` reaches `en`, `zh-TW` reaches `zh-Hant`, else `zh-CN`), then folds the stack\'s '
229+ + "declared fallback locale (`i18n.fallbackLocale`, "
226230 + 'else `defaultLocale`) the same way, then tries the literal `en-US`; a replacement template '
227231 + 'loader matches the tag exactly and retries only `en-US`. `en-US` is the floor every loader '
228232 + 'honours: when no rung lands on a row the call raises TEMPLATE_NOT_FOUND, which is permanent — '
0 commit comments