fix(notifications): translate notification titles via i18n - #3421
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughMedia request notifications now use localized message definitions. Notification text varies by notification state, media type, and 4K status. Existing recipients, subjects, routing, and error handling remain unchanged. ChangesLocalized notification messages
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Merge Risk: ⚪ Minimal · up to This localized change translates notification titles through i18n without any actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request fixes notification title localization by moving MediaRequest notification “event” titles from hardcoded English strings to i18n-backed ICU messages, aligning title translation behavior with the rest of the notification content.
Changes:
- Added reusable
notifications.event.*ICU message keys toserver/i18n/locale/en.json. - Updated
MediaRequest.sendNotificationto build the notificationeventtitle viaintl.formatMessage(...)using the new message descriptors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| server/i18n/locale/en.json | Adds new notifications.event.* translation keys using ICU select on media type. |
| server/entity/MediaRequest.ts | Replaces hardcoded English notification title composition with i18n message formatting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const intl = getIntl(); | ||
| const mediaType = entity.type === MediaType.MOVIE ? 'movie' : 'series'; | ||
| const is4k = entity.is4k; | ||
| let event: string | undefined; |
Description
Hello there,
The
eventfield used to build notification titles was built from hardcoded English strings in MediaRequest.sendNotification, bypassing i18n entirely - unlike the rest of the notification body, which already goes through intl.formatMessage.Fix :
Add generic
notifications.event.*keys to en.json, reusable by all notification apps, and buildeventvia intl.formatMessage. Each message uses an ICU select` on the media type (movie/series) so every locale can phrase its own full sentence with correct grammar and capitalization, instead of the code splicing a translated word into a fixed English sentence shape.AI Disclosure: I used Claude for advices about the fix and the description of this pull request.
How Has This Been Tested?
Ran
pnpm build, and a dev instance with my telegram bot (see screenshots below)Screenshots / Logs (if applicable)
Real example of the notification before the fix, a mix of English and French:
After the fix:


English:
French:
(french strings are not commited, I'll use weblate)
Checklist:
pnpm buildpnpm i18n:extract