diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-06-12 09:01:44 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-12 09:01:50 +0000 |
| commit | c4786fccfd23360a02e442c48ae2fb9f1e70aa4c (patch) | |
| tree | 95434422bfecf324a2112fadfc078a9bced134e7 /addons/mail | |
| parent | d093fd4236a7c7f18645a85970cbdda6fec44c92 (diff) | |
[IMP] *: update notifications to optional title
closes odoo/odoo#52826
Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/mail')
7 files changed, 10 insertions, 11 deletions
diff --git a/addons/mail/static/src/js/attachment_box.js b/addons/mail/static/src/js/attachment_box.js index f0bf5801108..507bb38ce49 100644 --- a/addons/mail/static/src/js/attachment_box.js +++ b/addons/mail/static/src/js/attachment_box.js @@ -129,7 +129,7 @@ var AttachmentBox = Widget.extend({ */ _onUploaded: function(ev, response) { if (response.error) { - this.do_warn(_t("Error"), _t("You are not allowed to upload an attachment here.")); + this.do_warn(false, _t("Attachment upload not authorized here")); } else { this.trigger_up('reload_attachment_box'); } diff --git a/addons/mail/static/src/js/composers/basic_composer.js b/addons/mail/static/src/js/composers/basic_composer.js index a38586f0da7..ffde77eac9a 100644 --- a/addons/mail/static/src/js/composers/basic_composer.js +++ b/addons/mail/static/src/js/composers/basic_composer.js @@ -265,7 +265,7 @@ var BasicComposer = Widget.extend({ */ _doCheckAttachmentUpload: function () { if (_.find(this.get('attachment_ids'), function (file) { return file.upload; })) { - this.do_warn(_t("Uploading error"), _t("Please, wait while the file is uploading.")); + this.do_warn(false, _t("Please wait while the file is uploading...")); return false; } return true; diff --git a/addons/mail/static/src/js/discuss.js b/addons/mail/static/src/js/discuss.js index 29a02738f66..5e17ce86d67 100644 --- a/addons/mail/static/src/js/discuss.js +++ b/addons/mail/static/src/js/discuss.js @@ -96,10 +96,10 @@ var PartnerInviteDialog = Dialog.extend({ var names = _.escape(_.pluck(data, 'text').join(', ')); var notification = _.str.sprintf( - _t("You added <b>%s</b> to the conversation."), + _t("You added <b>%s</b> to the conversation"), names ); - self.do_notify(_t("New people"), notification); + self.do_notify(false, notification); // Update list of members with the invited user, so that // we can mention this user in this channel right away. var channel = self.call('mail_service', 'getChannel', self._channelID); diff --git a/addons/mail/static/src/js/many2one_avatar_user.js b/addons/mail/static/src/js/many2one_avatar_user.js index fe768b089c1..ba92fdc3d5c 100644 --- a/addons/mail/static/src/js/many2one_avatar_user.js +++ b/addons/mail/static/src/js/many2one_avatar_user.js @@ -63,8 +63,7 @@ odoo.define('mail.Many2OneAvatarUser', function (require) { */ _displayWarning() { this.displayNotification({ - title: _t('Cannot chat with yourself'), - message: _t('Click on the avatar of other users to chat with them.'), + message: _t('You cannot chat with yourself'), type: 'info', }); }, diff --git a/addons/mail/static/src/js/services/mail_notification_manager.js b/addons/mail/static/src/js/services/mail_notification_manager.js index ef91155c9db..c7c5a03e6bf 100644 --- a/addons/mail/static/src/js/services/mail_notification_manager.js +++ b/addons/mail/static/src/js/services/mail_notification_manager.js @@ -250,7 +250,7 @@ MailManager.include({ channelData.info !== 'creation' ) { this.do_notify( - _t("Invitation"), + false, _t("You have been invited to: ") + channelData.name); } } @@ -530,7 +530,7 @@ MailManager.include({ } this._removeChannel(channel); this._mailBus.trigger('unsubscribe_from_channel', data.id); - this.do_notify(_t("Unsubscribed"), message); + this.do_notify(false, message); } }, /** diff --git a/addons/mail/static/src/js/thread_field.js b/addons/mail/static/src/js/thread_field.js index 2d809def129..a34582c1dde 100644 --- a/addons/mail/static/src/js/thread_field.js +++ b/addons/mail/static/src/js/thread_field.js @@ -95,7 +95,7 @@ var ThreadField = AbstractField.extend({ self.trigger_up('reload_mail_fields', { followers: true }); } }).guardedCatch(function () { - self.do_notify(_t("Sending Error"), _t("Your message has not been sent.")); + self.do_notify(false, _t("Message not sent")); return Promise.reject(); }); }, diff --git a/addons/mail/static/tests/many2one_avatar_user_tests.js b/addons/mail/static/tests/many2one_avatar_user_tests.js index 2864fcc1868..ef6803f68fd 100644 --- a/addons/mail/static/tests/many2one_avatar_user_tests.js +++ b/addons/mail/static/tests/many2one_avatar_user_tests.js @@ -136,7 +136,7 @@ QUnit.module('mail', {}, function () { throw new Error('should not call mail_service'); } if (ev.data.service === 'notification') { - assert.step(`display notification "${ev.data.args[0].title}"`); + assert.step(`display notification "${ev.data.args[0].message}"`); } }, true); @@ -146,7 +146,7 @@ QUnit.module('mail', {}, function () { assert.verifySteps([ 'read foo 4', - 'display notification "Cannot chat with yourself"', + 'display notification "You cannot chat with yourself"', ]); form.destroy(); |
