Repository navigation
Commit ac65e7e
docs(configure): the notification template locale is the notification's, not the recipient's (#255)
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.
Claude-Session: https://claude.ai/code/session_01ChPQM8jamxLUfUAxwFpJ8S
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1034f5f commit ac65e7e
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
| |||
0 commit comments