feat(email): add German email templates (de)#2624
feat(email): add German email templates (de)#26248emk10 wants to merge 1 commit intoseerr-team:developfrom
Conversation
📝 WalkthroughWalkthroughThis PR adds German email templates for password reset, generated password, media request, media issue, and test notifications. It also introduces a shared helpers file with localized string functions and subject/label generators, plus updates the GitHub workflow commit message quoting. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 5
🧹 Nitpick comments (1)
server/templates/email/de/_helpers.pug (1)
79-85: Missingvardeclarations for consistency.
__obfuscateUserand__helperare assigned withoutvar, unlike other helpers in this file. While Pug's unbuffered code allows this, addingvarmaintains consistency with the rest of the file (e.g., lines 5-6, 18-20).♻️ Suggested fix
-- __obfuscateUser = function(str) { +- var __obfuscateUser = function(str) { // Same behavior as EN: keep identity (can be expanded later) return `${str || ''}` } -- __helper = (typeof helper !== 'undefined' ? helper : function() { return '' }) +- var __helper = (typeof helper !== 'undefined' ? helper : function() { return '' })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@server/templates/email/de/_helpers.pug` around lines 79 - 85, The two helper assignments __obfuscateUser and __helper are missing var declarations; update the declarations for consistency with other helpers by prefixing both assignments with var (i.e., declare var __obfuscateUser and var __helper) while keeping their current initialization logic (__obfuscateUser returning the same string and __helper using the existing fallback function).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/create-tag.yml:
- Line 81: The git commit invocation using single quotes prevents shell variable
expansion for ${TAG_VERSION}; update the git commit command (the line containing
git commit -m 'chore(release): prepare ${TAG_VERSION}') to use double quotes so
the ${TAG_VERSION} variable is expanded in the commit message (i.e., change the
quoting around the -m argument).
In `@server/templates/email/de/_helpers.pug`:
- Around line 25-34: Move the __prefix4k definition out of the __reqSubject
function and initialize it at module scope (next to __isMovie / __isSeries) so
it is available to templates like body.pug; compute it from the existing is4k
flag (e.g., set module-level __prefix4k = (typeof is4k !== 'undefined' && is4k)
? '4K ' : '') and remove the inner const inside __reqSubject, leaving
__reqSubject to simply use the module-level __prefix4k when returning subject
strings.
In `@server/templates/email/de/media-request/body.pug`:
- Around line 1-18: The template uses __prefix4k at module scope but __prefix4k
is only computed inside __reqSubject() and is4k isn't passed into the locals; to
fix, either (A) pass is4k into the locals when rendering body.pug (so body.pug
can compute __prefix4k) and add a module-scope computation of __prefix4k at the
top of server/templates/email/de/media-request/body.pug using is4k (mirroring
how __followingAcc and __mediaLabelDat are defined), or (B) move the __prefix4k
definition into _helpers.pug at module scope (similar to __followingAcc and
__mediaLabelDat) so it reads is4k from locals and is available to case handling;
update references in body.pug to use the now-defined __prefix4k and ensure is4k
is present in render locals.
In `@server/templates/email/de/media-request/html.pug`:
- Around line 40-42: The table row starting with the lone `tr` (the block that
contains the `div(style='... url(' + imageUrl + ') ...')`) is dedented and
placed at root level, breaking the table structure; move/indent that `tr` so it
is nested with the other table rows (match the indentation of the preceding `tr`
block, i.e., add 4 spaces) so the `tr` is a child of the containing table/tbody
and the `div` remains inside that row.
In `@server/templates/email/de/media-request/subject.pug`:
- Around line 1-4: Add an include for the shared helper so the subject uses the
same media-type logic as the body: remove the local inline definition of
__isMovie and instead include _helpers.pug at the top (so __isMovie is derived
from mediaType === 'movie' with isMovie as fallback), leaving the existing
__kind and __kindReq uses intact; ensure the template still defines or uses __nt
(notificationType) as before but no longer redeclares __isMovie locally.
---
Nitpick comments:
In `@server/templates/email/de/_helpers.pug`:
- Around line 79-85: The two helper assignments __obfuscateUser and __helper are
missing var declarations; update the declarations for consistency with other
helpers by prefixing both assignments with var (i.e., declare var
__obfuscateUser and var __helper) while keeping their current initialization
logic (__obfuscateUser returning the same string and __helper using the existing
fallback function).
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
.github/workflows/create-tag.ymlserver/templates/email/de/_helpers.pugserver/templates/email/de/generatedpassword/html.pugserver/templates/email/de/generatedpassword/subject.pugserver/templates/email/de/media-issue/html.pugserver/templates/email/de/media-issue/subject.pugserver/templates/email/de/media-request/body.pugserver/templates/email/de/media-request/html.pugserver/templates/email/de/media-request/subject.pugserver/templates/email/de/resetpassword/html.pugserver/templates/email/de/resetpassword/subject.pugserver/templates/email/de/test-email/html.pugserver/templates/email/de/test-email/subject.pug
d43b830 to
d5e9b4a
Compare
|
👋 @8emk10, thank you for your contribution! |
|
@8emk10 this is the 2nd PR you send that is not respecting our code of conduct neither our contributing guide. A 3rd one like this will result in a ban. |
Adds German (de) email templates under server/templates/email/de.
Notes:
Summary by CodeRabbit