[FIX] mail: 'Logged _in_ as' on welcome page

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) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Alexandre Kühn
2024-01-12 12:50:36 +00:00
parent 6e2abdec82
commit 5912e7b761
3 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -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
@@ -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);
}
}
@@ -32,7 +32,7 @@
<label class="text-center fs-4" >What's your name?</label>
<input class="form-control mb-3 bg-white rounded" type="text" placeholder="Your name" t-model="state.userName" t-on-keydown="onKeydownInput"/>
</t>
<p t-if="store.user" class="fs-4">Logged as <span t-esc="store.user.name"/></p>
<p t-if="store.user" class="fs-4" t-esc="getLoggedInAsText"/>
<button class="btn btn-success fa-stack align-self-end p-0 rounded-circle fs-1 shadow" title="Join Channel" t-att-disabled="store.guest and state.userName.trim() === ''" t-on-click="joinChannel">
<i class="oi oi-arrow-right"/>
</button>