[FIX] website_forum: fix js template string translations
Some strings were not translated in website_forum because translation marks
inside backticks will not be extracted to be translated.
i.e., Markup`${_t("Please translate me"}, OK` will not work.
This commit fixes the issue by explicit translation before putting it inside the
backticks.
Task-3462273
closes odoo/odoo#137857
X-original-commit: 5f33cdb8120661dad58eae9be1d6a511dc712bbd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -3917,6 +3917,13 @@ msgstr ""
|
||||
msgid "it is a rant disguised as a question: “______ sucks, am I right?”"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_forum
|
||||
#. odoo-javascript
|
||||
#: code:addons/website_forum/static/src/js/website_forum.js:0
|
||||
#, python-format
|
||||
msgid "karma is required to perform this action. "
|
||||
msgstr ""
|
||||
|
||||
#. module: website_forum
|
||||
#. odoo-javascript
|
||||
#: code:addons/website_forum/static/src/xml/public_templates.xml:0
|
||||
|
||||
@@ -280,11 +280,12 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({
|
||||
${_t("Read the guidelines to know how to gain karma.")}
|
||||
</a>`)
|
||||
: "";
|
||||
const translatedText = _t("karma is required to perform this action. ");
|
||||
this.displayNotification({
|
||||
type: "warning",
|
||||
sticky: false,
|
||||
title: _t("Karma Error"),
|
||||
message: markup(`${karma} ${_t("karma is required to perform this action. ")}${additionalInfoWithForumID}`)
|
||||
message: markup(`${karma} ${translatedText}${additionalInfoWithForumID}`)
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user