summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_activity.py
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-06-15 15:16:16 +0200
committerMartin Trigaux <mat@odoo.com>2020-06-18 13:03:34 +0200
commit80e97e98ce76067db1079af8feeef667cfadf837 (patch)
treee261d34e3f8458bd99011f60f508bcce2c723baf /addons/mail/models/mail_activity.py
parent4a92a183e8631512a8b018eedaf9bf4956ca85e9 (diff)
[IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the translation to use named placeholder. This way, the order can be changed. It also helps the comprehension of the message.
Diffstat (limited to 'addons/mail/models/mail_activity.py')
-rw-r--r--addons/mail/models/mail_activity.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/models/mail_activity.py b/addons/mail/models/mail_activity.py
index dd92b4a17b3..81e04898477 100644
--- a/addons/mail/models/mail_activity.py
+++ b/addons/mail/models/mail_activity.py
@@ -433,7 +433,9 @@ class MailActivity(models.Model):
record.message_notify(
partner_ids=activity.user_id.partner_id.ids,
body=body,
- subject=_('%s: %s assigned to you') % (activity.res_name, activity.summary or activity.activity_type_id.name),
+ subject=_('%(activity_name)s: %(summary)s assigned to you',
+ activity_name=activity.res_name,
+ summary=activity.summary or activity.activity_type_id.name),
record_name=activity.res_name,
model_description=model_description,
email_layout_xmlid='mail.mail_notification_light',