summaryrefslogtreecommitdiff
path: root/addons/mail
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-08-08 13:39:22 +0000
committerMartin Trigaux <mat@odoo.com>2019-08-08 13:56:25 +0000
commit496d2c30ad7194d40d9adfdd27d61aa29508aeb5 (patch)
tree085ef89c56fe98aa952e08ad729aebc0a8c8b6c2 /addons/mail
parent5b83f7214f3412b303398580a5fe106af4c2f818 (diff)
[FIX] account,iap,sale,mail,portal: translate error messages
The error were untranslatables Courtesy of Moises Lopez closes odoo/odoo#35573 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/mail')
-rw-r--r--addons/mail/i18n/mail.pot84
-rw-r--r--addons/mail/models/mail_channel.py14
-rw-r--r--addons/mail/wizard/mail_resend_message.py2
3 files changed, 82 insertions, 18 deletions
diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot
index 741f43e9906..7cdfae7656f 100644
--- a/addons/mail/i18n/mail.pot
+++ b/addons/mail/i18n/mail.pot
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-29 10:09+0000\n"
-"PO-Revision-Date: 2019-03-29 10:09+0000\n"
+"POT-Creation-Date: 2019-08-08 13:50+0000\n"
+"PO-Revision-Date: 2019-08-08 13:50+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -3259,6 +3259,12 @@ msgid "Moderated channels"
msgstr ""
#. module: mail
+#: code:addons/mail/models/mail_channel.py:170
+#, python-format
+msgid "Moderated channels must have moderators."
+msgstr ""
+
+#. module: mail
#: model:ir.model.fields,field_description:mail.field_mail_channel__moderation_count
msgid "Moderated emails count"
msgstr ""
@@ -3304,6 +3310,18 @@ msgid "Moderators"
msgstr ""
#. module: mail
+#: code:addons/mail/models/mail_channel.py:154
+#, python-format
+msgid "Moderators must have an email address."
+msgstr ""
+
+#. module: mail
+#: code:addons/mail/models/mail_channel.py:160
+#, python-format
+msgid "Moderators should be members of the channel they moderate."
+msgstr ""
+
+#. module: mail
#: model_terms:ir.ui.view,arch_db:mail.mail_activity_type_view_form
msgid "Modifying the model can have an impact on existing activities using this activity type, be careful."
msgstr ""
@@ -3540,14 +3558,20 @@ msgstr ""
#. module: mail
#. openerp-web
-#: code:addons/mail/static/src/xml/thread.xml:28
+#: code:addons/mail/static/src/xml/thread.xml:29
#, python-format
msgid "No message matches your search. Try to change your search filters."
msgstr ""
#. module: mail
+#: code:addons/mail/wizard/mail_resend_message.py:51
+#, python-format
+msgid "No message_id found in context"
+msgstr ""
+
+#. module: mail
#. openerp-web
-#: code:addons/mail/static/src/xml/thread.xml:134
+#: code:addons/mail/static/src/xml/thread.xml:135
#, python-format
msgid "No starred message"
msgstr ""
@@ -3723,18 +3747,30 @@ msgstr ""
#. module: mail
#. openerp-web
#: code:addons/mail/static/src/xml/discuss.xml:156
-#: code:addons/mail/static/src/xml/discuss.xml:276
+#: code:addons/mail/static/src/xml/discuss.xml:277
#, python-format
msgid "Online"
msgstr ""
#. module: mail
-#: code:addons/mail/models/ir_model.py:28
+#: code:addons/mail/models/mail_channel.py:436
+#, python-format
+msgid "Only an administrator or a moderator can send guidelines to channel members!"
+msgstr ""
+
+#. module: mail
+#: code:addons/mail/models/ir_model.py:53
#, python-format
msgid "Only custom models can be modified."
msgstr ""
#. module: mail
+#: code:addons/mail/models/mail_channel.py:165
+#, python-format
+msgid "Only mailing lists can be moderated."
+msgstr ""
+
+#. module: mail
#: selection:mail.channel.partner,fold_state:0
msgid "Open"
msgstr ""
@@ -4219,6 +4255,14 @@ msgid "Record Thread ID"
msgstr ""
#. module: mail
+#: code:addons/mail/models/mail_activity.py:244
+#: code:addons/mail/models/mail_message.py:728
+#: code:addons/mail/models/mail_message.py:899
+#, python-format
+msgid "Records:"
+msgstr ""
+
+#. module: mail
#: model:ir.model.fields,field_description:mail.field_mail_mail__references
msgid "References"
msgstr ""
@@ -5327,12 +5371,20 @@ msgid "User name"
msgstr ""
#. module: mail
+#: code:addons/mail/models/mail_activity.py:244
+#: code:addons/mail/models/mail_message.py:728
+#: code:addons/mail/models/mail_message.py:899
+#, python-format
+msgid "User:"
+msgstr ""
+
+#. module: mail
#: model:ir.model,name:mail.model_res_users
msgid "Users"
msgstr ""
#. module: mail
-#: code:addons/mail/models/mail_channel.py:959
+#: code:addons/mail/models/mail_channel.py:965
#, python-format
msgid "Users in this channel: %s %s and you."
msgstr ""
@@ -5360,7 +5412,13 @@ msgid "View"
msgstr ""
#. module: mail
-#: code:addons/mail/models/mail_thread.py:745
+#: code:addons/mail/models/mail_channel.py:434
+#, python-format
+msgid "View \"mail.mail_channel_send_guidelines\" was not found. No email has been sent. Please contact an administrator to fix this issue."
+msgstr ""
+
+#. module: mail
+#: code:addons/mail/models/mail_thread.py:752
#, python-format
msgid "View %s"
msgstr ""
@@ -5541,13 +5599,19 @@ msgid "You cannot create a new user from here.\n"
msgstr ""
#. module: mail
-#: code:addons/mail/models/mail_channel.py:241
+#: code:addons/mail/models/mail_channel.py:246
#, python-format
msgid "You cannot delete those groups, as the Whole Company group is required by other modules."
msgstr ""
#. module: mail
-#: code:addons/mail/models/mail_thread.py:2358
+#: code:addons/mail/models/mail_channel.py:257
+#, python-format
+msgid "You do not have the rights to modify fields related to moderation on one of the channels you are modifying."
+msgstr ""
+
+#. module: mail
+#: code:addons/mail/models/mail_thread.py:2365
#, python-format
msgid "You have been assigned to %s"
msgstr ""
diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py
index 9335e2f32a3..2fcc65d17b6 100644
--- a/addons/mail/models/mail_channel.py
+++ b/addons/mail/models/mail_channel.py
@@ -151,23 +151,23 @@ class Channel(models.Model):
@api.constrains('moderator_ids')
def _check_moderator_email(self):
if any(not moderator.email for channel in self for moderator in channel.moderator_ids):
- raise ValidationError("Moderators must have an email address.")
+ raise ValidationError(_("Moderators must have an email address."))
@api.constrains('moderator_ids', 'channel_partner_ids', 'channel_last_seen_partner_ids')
def _check_moderator_is_member(self):
for channel in self:
if not (channel.mapped('moderator_ids.partner_id') <= channel.sudo().channel_partner_ids):
- raise ValidationError("Moderators should be members of the channel they moderate.")
+ raise ValidationError(_("Moderators should be members of the channel they moderate."))
@api.constrains('moderation', 'email_send')
def _check_moderation_parameters(self):
if any(not channel.email_send and channel.moderation for channel in self):
- raise ValidationError('Only mailing lists can be moderated.')
+ raise ValidationError(_('Only mailing lists can be moderated.'))
@api.constrains('moderator_ids')
def _check_moderator_existence(self):
if any(not channel.moderator_ids for channel in self if channel.moderation):
- raise ValidationError('Moderated channels must have moderators.')
+ raise ValidationError(_('Moderated channels must have moderators.'))
@api.multi
def _compute_is_member(self):
@@ -254,7 +254,7 @@ class Channel(models.Model):
# First checks if user tries to modify moderation fields and has not the right to do it.
if any(key for key in MODERATION_FIELDS if vals.get(key)) and any(self.env.user not in channel.moderator_ids for channel in self if channel.moderation):
if not self.env.user.has_group('base.group_system'):
- raise UserError("You do not possess the rights to modify fields related to moderation on one of the channels you are modifying.")
+ raise UserError(_("You do not have the rights to modify fields related to moderation on one of the channels you are modifying."))
tools.image_resize_images(vals)
result = super(Channel, self).write(vals)
@@ -431,9 +431,9 @@ class Channel(models.Model):
if self.env.user in self.moderator_ids or self.env.user.has_group('base.group_system'):
success = self._send_guidelines(self.channel_partner_ids)
if not success:
- raise UserError('View "mail.mail_channel_send_guidelines" was not found. No email has been sent. Please contact an administrator to fix this issue.')
+ raise UserError(_('View "mail.mail_channel_send_guidelines" was not found. No email has been sent. Please contact an administrator to fix this issue.'))
else:
- raise UserError("Only an administrator or a moderator can send guidelines to channel members!")
+ raise UserError(_("Only an administrator or a moderator can send guidelines to channel members!"))
@api.multi
def _send_guidelines(self, partners):
diff --git a/addons/mail/wizard/mail_resend_message.py b/addons/mail/wizard/mail_resend_message.py
index 12255735871..561597509f2 100644
--- a/addons/mail/wizard/mail_resend_message.py
+++ b/addons/mail/wizard/mail_resend_message.py
@@ -48,7 +48,7 @@ class MailResendMessage(models.TransientModel):
rec['mail_message_id'] = mail_message_id.id
rec['partner_ids'] = partner_ids
else:
- raise UserError('No message_id found in context')
+ raise UserError(_('No message_id found in context'))
return rec
@api.multi