From 5912e7b761a2fda12171dcd61cfca80fd90158f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 10 Jan 2024 16:13:28 +0000 Subject: [PATCH] [FIX] mail: 'Logged _in_ as' on welcome page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Label of guest name on public discuss welcome page was gramatically incorrect. It should be "Logged in as" rather than "Logged as". Also took the opportunity to properly translate the label. closes odoo/odoo#149187 X-original-commit: 9463c787e7804e5c2c525b9ecc096ee067f0dd3d Signed-off-by: Alexandre Kühn (aku) Signed-off-by: Sébastien Theys (seb) --- addons/mail/i18n/mail.pot | 4 ++-- addons/mail/static/src/discuss/core/public/welcome_page.js | 5 +++++ addons/mail/static/src/discuss/core/public/welcome_page.xml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index becaa604898..48f154e8068 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -5236,9 +5236,9 @@ msgstr "" #. module: mail #. odoo-javascript -#: code:addons/mail/static/src/discuss/core/public/welcome_page.xml:0 +#: code:addons/mail/static/src/discuss/core/public/welcome_page.js:0 #, python-format -msgid "Logged as" +msgid "Logged in as" msgstr "" #. module: mail diff --git a/addons/mail/static/src/discuss/core/public/welcome_page.js b/addons/mail/static/src/discuss/core/public/welcome_page.js index 7ebfda342cb..b5ef4a3ed5f 100644 --- a/addons/mail/static/src/discuss/core/public/welcome_page.js +++ b/addons/mail/static/src/discuss/core/public/welcome_page.js @@ -4,6 +4,8 @@ import { Component, useRef, useState } from "@odoo/owl"; import { browser } from "@web/core/browser/browser"; import { useService } from "@web/core/utils/hooks"; +import { sprintf } from "@web/core/utils/strings"; +import { _t } from "@web/core/l10n/translation"; export class WelcomePage extends Component { static props = ["data?", "proceed?"]; @@ -115,4 +117,7 @@ export class WelcomePage extends Component { Boolean(this.state.videoStream) ); } + getLoggedInAsText() { + return sprintf(_t("Logged in as %s"), this.store.user.name); + } } diff --git a/addons/mail/static/src/discuss/core/public/welcome_page.xml b/addons/mail/static/src/discuss/core/public/welcome_page.xml index 7d2663de453..18df64a2fa3 100644 --- a/addons/mail/static/src/discuss/core/public/welcome_page.xml +++ b/addons/mail/static/src/discuss/core/public/welcome_page.xml @@ -32,7 +32,7 @@ -

Logged as

+