Repository navigation
Description
Surfaced while implementing #8195 (PR #9134). Filed unassigned, observation-class — the shipped behaviour is correct for the four locales we ship, so nothing is broken. What is worth a decision is whether the source the ruling named is the one this should keep reading.
What the #8195 ruling named, and what it actually returns
The 2026-08-13 ruling said recipient locale comes from the deployment default via II18nService.getDefaultLocale(). Measured during implementation, that method carries the message catalog language, whose English spelling is the bare 'en' (FileI18nAdapter: options.defaultLocale ?? 'en').
sys_email_template rows are keyed 'en-US', and SendTemplateInput.locale is documented as matched exactly — the contract states "no language-only prefix matching".
Passed through raw, the commonest deployment of all would therefore miss every row, fall back to the en-US body, and still hand 'en' to the render filters — #7801's row-locale-vs-render-locale split reopened one notch narrower.
How #9134 resolved it
normalizeAuthEmailLocale promotes a bare language subtag to the regional row we ship (en⇒en-US, zh⇒zh-CN, …) and passes everything else through untouched — deliberately, because an unshipped regional tag like en-GB or fr-FR may be a tenant's own overlay row, and swallowing it would recreate this same bug from the fifth locale onward.
That is an adaptation between two value spaces, not a change of source, so it was treated as an implementation detail rather than a re-adjudication. Reasonable, and it is pinned in both directions in auth-email-locale.test.ts.
The residual question — which axis is authoritative
There is a second axis, found while measuring and not known when the ruling was made:
| value space | default | |
|---|---|---|
II18nService.getDefaultLocale() |
catalog language, bare subtag (en) |
'en' |
the localization.locale setting |
a select whose four options are byte-identical to the template locale set | en-US |
The setting needs no normalization at all — its option set already is the template row key set.
The two can disagree: a deployment whose message catalog is zh but whose localization.locale is en-US gets Chinese auth mail today. Whether that is right (the catalog is what the operator actually reads) or wrong (the localization setting is the declared intent) is a product judgement, not a measurement — which is why it is recorded here rather than changed.
⛔ Not proposing a switch. If the i18n service is the intended authority, the normalizer is correct and permanent, and this card closes as "answered". If localization.locale is the intended authority, the normalizer is a workaround for having read the other axis, and the change is a one-line source swap plus deleting the normalizer.
Reference
packages/plugins/plugin-auth/src/auth-plugin.ts— readsII18nService.getDefaultLocale()onkernel:readypackages/plugins/plugin-auth/src/auth-manager.ts—setDefaultEmailLocale()/normalizeAuthEmailLocalepackages/plugins/plugin-email/src/email-service.ts— the exact-match ladder and the render-filter locale- Auth emails are always en-US: no send names a locale and sys_user has no locale column, so localized template rows can never be selected #8195 / PR fix(auth): auth emails follow the deployment locale — five templates localized, all five sends name a locale #9134 (the ruling and its implementation) · finding: a no-locale sendTemplate resolves the en-US row but renders format filters under the runtime locale — renderOpts.locale stays unset #7801 (row locale vs render-filter locale) · email-template-render (b): sendTemplate with no locale renders an arbitrary locale instead of the en-US default #7731 (why a no-locale send resolves en-US)
Activity
os-zhuang commentedon Aug 17, 2026
First-touch triage (triage seat, scheduled fire 2026-08-17 ~03:36Z): closing not planned.
Rationale: the #8195 ruling named
II18nService.getDefaultLocale()as the recipient-locale source; PR #9134'snormalizeAuthEmailLocaleadapts the two value spaces and is pinned in both directions, so shipped behaviour is correct for every shipped locale. The residual question — which axis wins when the catalog language andlocalization.localedisagree — has zero measured pull (no deployment has reported mismatched auth-mail language), and reversing later is a one-line source swap plus deleting the normalizer; nothing accrues by keeping the card open. The existing ruling stands as the decision of record.Reopen is free if a real deployment hits the disagreement; the maintainer can veto this closure.
Generated by Claude Code