From 04c98eeb4810652aac248720184ae7cdfb6dda2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Fri, 13 Jul 2018 16:41:31 +0200 Subject: [PATCH] [FIX] mail: replace _lt to _t for mailboxes' name Since mailboxes are added after the rpc 'mail/init_message', the translations are loaded. Therefore it is not necessary to lazily load the translations. --- addons/mail/static/src/js/models/threads/abstract_thread.js | 4 ++-- addons/mail/static/src/js/services/mail_manager.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mail/static/src/js/models/threads/abstract_thread.js b/addons/mail/static/src/js/models/threads/abstract_thread.js index 74be953734d..fb31c5156c6 100644 --- a/addons/mail/static/src/js/models/threads/abstract_thread.js +++ b/addons/mail/static/src/js/models/threads/abstract_thread.js @@ -53,7 +53,7 @@ var AbstractThread = Class.extend({ /** * Get the name of this thread * - * @returns {string|Object} object for lazy translated names with _lt + * @returns {string} */ getName: function () { return this._name; @@ -69,7 +69,7 @@ var AbstractThread = Class.extend({ /** * Returns the title to display in thread window's headers. * - * @returns {string|Object} the name of the thread by default (see @getName) + * @returns {string} the name of the thread by default (see @getName) */ getTitle: function () { return this.getName(); diff --git a/addons/mail/static/src/js/services/mail_manager.js b/addons/mail/static/src/js/services/mail_manager.js index 0ceeb809fde..6f159951436 100644 --- a/addons/mail/static/src/js/services/mail_manager.js +++ b/addons/mail/static/src/js/services/mail_manager.js @@ -884,19 +884,19 @@ var MailManager = AbstractService.extend({ _initializeMailboxes: function (data) { this._addMailbox({ id: 'inbox', - name: _lt("Inbox"), + name: _t("Inbox"), mailboxCounter: data.needaction_inbox_counter || 0, }); this._addMailbox({ id: 'starred', - name: _lt("Starred"), + name: _t("Starred"), mailboxCounter: data.starred_counter || 0, }); if (data.is_moderator) { this._addMailbox({ id: 'moderation', - name: _lt("Moderate Messages"), + name: _t("Moderate Messages"), mailboxCounter: data.moderation_counter || 0, }); }