diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-04 12:39:11 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | ba244cef01132347df4d2d9553ea3105ba13a938 (patch) | |
| tree | 20cdb55afb6b9f700bfe2844a90ca8de0050c941 /addons/mail/models/mail_template.py | |
| parent | 3c3b88f6768e31417263b3828a874ca204e29514 (diff) | |
[IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))
Old syntax is still compatible but starts the migration to the new
syntax that catches error.
Diffstat (limited to 'addons/mail/models/mail_template.py')
| -rw-r--r-- | addons/mail/models/mail_template.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index f8f90aea5fd..92783104b65 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -74,7 +74,7 @@ class MailTemplate(models.Model): @api.returns('self', lambda value: value.id) def copy(self, default=None): default = dict(default or {}, - name=_("%s (copy)") % self.name) + name=_("%s (copy)", self.name)) return super(MailTemplate, self).copy(default=default) def unlink_action(self): @@ -88,7 +88,7 @@ class MailTemplate(models.Model): view = self.env.ref('mail.email_compose_message_wizard_form') for template in self: - button_name = _('Send Mail (%s)') % template.name + button_name = _('Send Mail (%s)', template.name) action = ActWindow.create({ 'name': button_name, 'type': 'ir.actions.act_window', @@ -200,7 +200,7 @@ class MailTemplate(models.Model): else: res = report._render([res_id]) if not res: - raise UserError(_('Unsupported report type %s found.') % report.report_type) + raise UserError(_('Unsupported report type %s found.', report.report_type)) result, format = res # TODO in trunk, change return format to binary to match message_post expected format |
