Repository navigation
Conversation
The event line ("New Movie Request", "Movie Request Now Available", ...)
was built as a hardcoded English string by the notification producers, so
every agent printed it in English no matter the recipient's locale, right
next to fields that were already translated.
Producers now record which message applies, along with the raw values it
needs (is4k, media type, issue type), and each agent renders that line in
its own recipient's locale, the same way webpush already builds its body.
The webhook payload keeps the English wording it has always exposed: the
notification manager derives `event` from the new message before handing
the payload to the agents.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (17)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughNotification events now use structured i18n descriptors. Producers pass event metadata, dispatch preserves English webhook text, and notification agents render localized messages with fallbacks. ChangesLocalized notification events
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Subscriber
participant sendNotification
participant NotificationAgent
Subscriber->>sendNotification: send eventMessage descriptor and metadata
sendNotification->>sendNotification: derive English event fallback
sendNotification->>NotificationAgent: dispatch payload
NotificationAgent->>NotificationAgent: format event for configured locale
NotificationAgent-->>Subscriber: render localized notification
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Localized event lines safely fall back to English until Weblate translations are available, so no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit tunes the message bell, Comment |
|
Please do not create duplicate PRs. Also this doesn't follow the contributing guidelines properly. Please read the guidelines properly before creating a PR in the future. |
Description
The event line of a notification — "New Movie Request", "Movie Request Now
Available", "New Video Issue Reported" — was built as a hardcoded English
string by the notification producers (
MediaRequest.sendNotification,MediaRequestSubscriber,IssueSubscriber,IssueCommentSubscriber).Every agent then printed that string as-is, so a user with a non-English
locale got a notification whose first line was English while the fields right
below it ("Requested By", "Request Status", "Pending Approval") were already
translated through
intl.formatMessage. On Telegram it looks like this, withthe title and overview coming from TMDB in the user's language:
Producers now record which message applies plus the raw values it needs
(
is4k, media type, issue type) in a neweventMessagefield, and each agentrenders that line with its own recipient's locale. This is the same approach
webpush.tsalready uses to build its body, so it introduces no new pattern.The webhook payload is unchanged:
NotificationManager.sendNotificationderives
eventfrom the new message in English before handing the payload tothe agents, so anything parsing
{{event}}keeps receiving the exact stringsit received before.
Only
en.jsonis updated here — the other locales are left to Weblate.No linked issue.
How Has This Been Tested?
Tested on Node 22.23.2 / pnpm 10.24.0, against
developat 6fa7473.pnpm test— 205/205 passing, including 16 new tests inserver/i18n/eventMessages.test.ts. 14 of those assert the exact Englishwording of every event, case by case ("4K Series Now Available",
"New Video Issue Reported", "New Comment on Audio Issue", …), so the strings
the webhook has always exposed are locked down against regressions.
pnpm typecheck:server— clean.pnpm lint— no errors (19 pre-existing warnings, untouched).pnpm build— successful.pnpm i18n:extract— regeneratesserver/i18n/locale/en.jsonwith the 16new
notifications.events.*keys; re-running it produces no further diff.No database migration is required, and no documentation references the event
strings.
Screenshots / Logs (if applicable)
N/A
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit
New Features
Bug Fixes