Uh oh!
There was an error while loading. Please reload this page.
docs(configure): the notification template locale is the notification's, not the recipient's - #255
Merged
Conversation
…ecipient's
The Notification Templates field table told an admin that a template's `locale`
is "matched to the recipient". The delivery path never reads a recipient
locale: `messaging-service.ts` contains zero occurrences of `locale` (control-
probed against 41/14/14 in the sibling channel files), and `recipient-
resolver.ts` — the file whose whole job is resolving recipients — has zero as
well. Both template channels resolve it identically, byte for byte:
`email-channel.ts:224` and `sms-channel.ts:124` are
`const locale = typeof payload.locale === 'string' ? payload.locale : defaultLocale;`,
and the inbox notify-template path takes `payload.locale` else
`getDefaultTemplateLocale()` (`inbox-channel.ts:143-145`), which reads
`i18n.getDefaultLocale()`.
So the locale is the notification's own, and one emit renders in a single
locale for everyone it fans out to. The page was inviting an admin to author
`es` and `en` rows expecting two recipients to read in their own languages,
which cannot pay off. Corrected the field-table cell and stated the
consequence next to the table, aligned to upstream's own phrasing at
`messaging-service-plugin.ts:250` ("one locale per notification: payload.locale,
else the deployment default") rather than coining a third wording.
Reports the wiring as it stands; makes no forecast about recipient-locale
matching.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ChPQM8jamxLUfUAxwFpJ8Sos-bill
marked this pull request as ready for review
September 2, 2026 15:24
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#246
The Notification Templates field table told an admin that a template's
localeis "matched to the recipient". The delivery path never reads a recipient locale, so authoringesandenrows for a topic cannot give two recipients their own languages — it gives whichever locale the producer named.What changed
content/docs/configure/notifications.mdx, two edits carrying one claim:Locale of this rendering — the notification's own, not the recipient's.payload.localewhen the producer sets one, else the deployment default, and one emit renders in a single locale for every recipient it reaches.The wording is aligned to upstream's own phrasing at
messaging-service-plugin.ts:250— "one locale per notification: payload.locale, else the deployment default" — rather than a third coinage.This reports the wiring as it stands. It makes no forecast about recipient-locale matching, and it does not touch the question of whether the platform should match on recipient locale — that is a product question and a different card.
Upstream re-trace
Re-measured on
objectstackorigin/main@2514d49. The card measured9e0ba21and dispatch expected90ff957; both were stale, so this was re-read rather than quoted forward. Every claim in the card survives:messaging-service.tslocale, in 1095 linesrecipient-resolver.tslocale— the file whose whole job is resolving recipientsemail-channel.ts:224const locale = typeof payload.locale === 'string' ? payload.locale : defaultLocale;sms-channel.ts:124ec055715f3db3f6cbcf5ddd08af48185inbox-channel.ts:143-145payload.locale, elsegetDefaultTemplateLocale()messaging-service-plugin.ts:148-156getDefaultTemplateLocaleresolvesi18n.getDefaultLocale()Control-probed, because a zero from a path-scoped grep is worth nothing on its own. The same probe returns 41 hits in
email-channel.ts, 14 insms-channel.ts, 14 ininbox-channel.tsand 21 inmessaging-service-plugin.ts; and insidemessaging-service.tsitself, read the same way, it returns 52recipient, 33emitand 95channel. The absence is real, not a broken pathspec.The last row is also why the existing "Where to go next" link — "Set locale defaults that templates match against" pointing at Localization — stays accurate: the deployment default really is the tenant Localization setting.
For a reviewer wondering whether this is upstream drift rather than intent: objectstack#12178 and objectstack#12446 record a maintainer ruling of 2026-08-13 that this resolution is deliberate, and note that
sys_usercarries no locale column for a channel to read. That sweep's PR objectstack#12505 is whymessaging-service-plugin.ts:250reads honestly today.Verification
All gates below ran on
a059c27, the final commit, against a clean worktree. Each row quotes the gate's own conclusion.turbo run type-check build --filter=@objectos/docsTasks: 2 successful, 2 total·Cached: 0 cached, 2 total— both ran, neither replayedcheck-locale-surface.mjs(reads the BUILT sitemap)sitemap.xml409 read / 409 expected / 0 unexpected / 0 missingcheck-translations.mjs(freshness)check-translation-ownership.mjscheck-translation-output.mjs --filesgen-zh-hant.mjs --checkcheck-node-floor.mjsturbo run test1 successful— a legitimate cache hit: thetesttask declares nocontent/docs/**input, so this diff cannot affect itRendering was confirmed on the build artifact, not just on the source: the corrected row and the new paragraph appear in
apps/docs/.next/server/app/en/docs/configure/notifications.html, and the string "matched to the recipient" appears zero times anywhere underapps/docs/.next/.Scope
content/docs/configure/notifications.mdxonly.No locale siblings were touched, and none exist: this page is one of the English-only pages, so the whole translation family is a no-op here rather than merely left alone.
I checked whether anything PR #247 added implies recipient-locale matching by implication. It does not — the "What each channel renders" table names
localeas a bare match key without attributing it to anyone, and with the field-table row corrected its antecedent is now unambiguous. No edits were manufactured there.Generated by Claude Code