diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-15 15:16:16 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | 80e97e98ce76067db1079af8feeef667cfadf837 (patch) | |
| tree | e261d34e3f8458bd99011f60f508bcce2c723baf /addons/crm | |
| parent | 4a92a183e8631512a8b018eedaf9bf4956ca85e9 (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/crm')
| -rw-r--r-- | addons/crm/models/crm_lead.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 2c7b2b541f7..52f669bb9ba 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -894,7 +894,11 @@ class Lead(models.Model): for message in opportunity.message_ids: message.write({ 'res_id': self.id, - 'subject': _("From %s : %s") % (opportunity.name, message.subject) + 'subject': _( + "From %(source_name)s : %(source_subject)s", + source_name=opportunity.name, + source_subject=message.subject + ) }) return True |
