From a059c27ed474ead958046cbeddc91f739d5d1677 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 15:12:21 +0000 Subject: [PATCH] docs(configure): the template locale is the notification's, not the recipient's MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01ChPQM8jamxLUfUAxwFpJ8S --- content/docs/configure/notifications.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/docs/configure/notifications.mdx b/content/docs/configure/notifications.mdx index f22104f..98ac3f0 100644 --- a/content/docs/configure/notifications.mdx +++ b/content/docs/configure/notifications.mdx @@ -166,13 +166,20 @@ those channels send. The in-app inbox does not read these rows — see |---|---| | `topic` | Topic this template renders | | `channel` | Channel the rendered output targets | -| `locale` | Locale of this rendering (matched to the recipient) | +| `locale` | Locale of this rendering — the notification's own, not the recipient's | | `version` | Template version number | | `subject` | Rendered title | | `body` | Message body (markdown) | | `format` | Output format for the body | | `is_active` | Boolean — whether this template is used for rendering | +The locale is matched on the **notification**, not the recipient: a delivery +renders with `payload.locale` when the producer sets one, else the deployment +default. Nothing resolves a locale from the person receiving it, so one emit +renders in a single locale for every recipient it reaches — authoring `es` and +`en` rows for a topic gives the producer two renderings to choose between, not +two recipients reading in their own language. + These objects are **system-managed**: rows are seeded by the platform and the capabilities you run, so most of your work is editing template content or toggling `is_active`, `enabled`, and preference defaults rather than creating