From 15b93edc8efa134cd476f75ab88f47fab466e12e Mon Sep 17 00:00:00 2001 From: David Tran Date: Fri, 11 Mar 2022 02:39:57 +0000 Subject: [PATCH] [I18N] mail: add missing func _ for messages closes odoo/odoo#86521 X-original-commit: a08f4e00715dba4a0447dce879b46da0e581669e Signed-off-by: Thibault Delavallee (tde) --- addons/mail/i18n/mail.pot | 15 +++++++++++++++ addons/mail/models/mail_blacklist.py | 2 +- addons/mail/models/mail_thread_blacklist.py | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index df6ac435d49..f76a19caec9 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -902,6 +902,13 @@ msgid "" "able to re-send these mails later!" msgstr "" +#. module: mail +#: code:addons/mail/models/mail_blacklist.py:0 +#: code:addons/mail/models/mail_thread_blacklist.py:0 +#, python-format +msgid "Are you sure you want to unblacklist this Email Address?" +msgstr "" + #. module: mail #. openerp-web #: code:addons/mail/static/src/js/m2x_avatar_user.js:0 @@ -7571,6 +7578,14 @@ msgid "" "address (%s)." msgstr "" +#. module: mail +#: code:addons/mail/models/mail_thread_blacklist.py:0 +#, python-format +msgid "" +"You do not have the access right to unblacklist emails. Please contact your " +"administrator." +msgstr "" + #. module: mail #: code:addons/mail/models/mail_thread.py:0 #, python-format diff --git a/addons/mail/models/mail_blacklist.py b/addons/mail/models/mail_blacklist.py index fdb3223ad53..4fdd6c6764f 100644 --- a/addons/mail/models/mail_blacklist.py +++ b/addons/mail/models/mail_blacklist.py @@ -96,7 +96,7 @@ class MailBlackList(models.Model): def mail_action_blacklist_remove(self): return { - 'name': 'Are you sure you want to unblacklist this Email Address?', + 'name': _('Are you sure you want to unblacklist this Email Address?'), 'type': 'ir.actions.act_window', 'view_mode': 'form', 'res_model': 'mail.blacklist.remove', diff --git a/addons/mail/models/mail_thread_blacklist.py b/addons/mail/models/mail_thread_blacklist.py index f17302f360e..48b9e734ab8 100644 --- a/addons/mail/models/mail_thread_blacklist.py +++ b/addons/mail/models/mail_thread_blacklist.py @@ -116,11 +116,11 @@ class MailBlackListMixin(models.AbstractModel): can_access = self.env['mail.blacklist'].check_access_rights('write', raise_exception=False) if can_access: return { - 'name': 'Are you sure you want to unblacklist this Email Address?', + 'name': _('Are you sure you want to unblacklist this Email Address?'), 'type': 'ir.actions.act_window', 'view_mode': 'form', 'res_model': 'mail.blacklist.remove', 'target': 'new', } else: - raise AccessError("You do not have the access right to unblacklist emails. Please contact your administrator.") + raise AccessError(_("You do not have the access right to unblacklist emails. Please contact your administrator."))