From df0cbf88fc451918bde986720bd06142cfd0cb1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 1 Dec 2021 11:36:02 +0000 Subject: [PATCH] [FIX] mail: make rtc dialogs title translatable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the title of RTC dialogs -- like "Change Layout" menu during a video-conference -- was not properly translated. The titles were always shown in English as a result. This commit now properly mark them as translatable string, so they should now be properly translated in other languages than English. Task-2703292 closes odoo/odoo#80689 X-original-commit: fbcdb644f24ecd10049a3730099c4a426a1f607f Signed-off-by: Sébastien Theys (seb) Signed-off-by: Alexandre Kühn (aku) --- addons/mail/i18n/mail.pot | 8 ++++++ .../rtc_call_viewer/rtc_call_viewer.xml | 4 +-- .../models/rtc_call_viewer/rtc_call_viewer.js | 26 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 8b01ae59808..4fcc3ebc30e 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -6029,6 +6029,7 @@ msgstr "" #. module: mail #. openerp-web #: code:addons/mail/static/src/components/rtc_option_list/rtc_option_list.xml:0 +#: code:addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js:0 #, python-format msgid "Settings" msgstr "" @@ -6480,6 +6481,13 @@ msgstr "" msgid "The FullScreen mode was denied by the browser" msgstr "" +#. module: mail +#. openerp-web +#: code:addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js:0 +#, python-format +msgid "Change Layout" +msgstr "" + #. module: mail #: model:ir.model.fields,help:mail.field_res_partner__vat #: model:ir.model.fields,help:mail.field_res_users__vat diff --git a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml index 558c64d5ebc..337644b0a1d 100644 --- a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml +++ b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml @@ -51,7 +51,7 @@ - + @@ -59,7 +59,7 @@ - + diff --git a/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js b/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js index 3ca387c068b..9b150182f7e 100644 --- a/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js +++ b/addons/mail/static/src/models/rtc_call_viewer/rtc_call_viewer.js @@ -179,6 +179,13 @@ registerModel({ } return this.messaging.userSetting.rtcLayout; }, + /** + * @private + * @returns {string} + */ + _computeLayoutSettingsTitle() { + return this.env._t("Change Layout"); + }, /** * @private */ @@ -195,6 +202,13 @@ registerModel({ } return unlink(); }, + /** + * @private + * @returns {string} + */ + _computeSettingsTitle() { + return this.env._t("Settings"); + }, /** * @private */ @@ -333,6 +347,12 @@ registerModel({ default: 'tiled', compute: '_computeLayout', }), + /** + * Text content that is displayed on title of the layout settings dialog. + */ + layoutSettingsTitle: attr({ + compute: '_computeLayoutSettingsTitle', + }), /** * If set, the card to be displayed as the "main/spotlight" card. */ @@ -357,6 +377,12 @@ registerModel({ inverse: 'callViewer', isCausal: true, }), + /** + * Text content that is displayed on title of the settings dialog. + */ + settingsTitle: attr({ + compute: '_computeSettingsTitle', + }), /** * Determines if we show the overlay with the control buttons. */