Skip to content

Commit

Permalink
Merge pull request #671 from euphorie/scrum-1572--fixes
Browse files Browse the repository at this point in the history
Notifications: translation fixes and updates
  • Loading branch information
thet authored Nov 23, 2023
2 parents 297e1f5 + 66f0dea commit 7b97fc7
Show file tree
Hide file tree
Showing 30 changed files with 2,100 additions and 1,935 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,25 @@ def main_text(self):
You have not modified your risk assessment for ${reminder_days} days. Please \
remember to keep your risk assessment up to date.
With this link you can access the risk assessment.""",
msgid_plural="notification_mail_body__ra_not_modified__plural",
default_plural="""\
You have not modified your risk assessments for ${reminder_days} days. Please \
remember to keep your risk assessments up to date.
With these links you can access the risk assessments.""",
mapping={
"reminder_days": self.reminder_days,
},
number=len(self.sessions),
)

@property
def translatable_subject(self):
return _(
"notification_mail_subject__ra_not_modified",
default="Reminder: Update of risk assessment",
default="Reminder: Update of risk assessment (${num} open)",
mapping={
"num": len(self.sessions),
},
)

@property
Expand Down
3 changes: 2 additions & 1 deletion src/euphorie/client/tests/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ def test_send_notification(self):
mail = mail_fixture.storage[0][0][0]
self.assertIn(self.account.email, mail.get("To"))
self.assertEqual(
mail_fixture.storage[0][1]["subject"], "Reminder: Update of risk assessment"
mail_fixture.storage[0][1]["subject"],
"Reminder: Update of risk assessment (1 open)",
)
Loading

0 comments on commit 7b97fc7

Please sign in to comment.