[FIX] website_sale: translate cart notification
Missing _t to translate a string made it so the cart notification title was always in English. opw-3683578 closes odoo/odoo#149761 Signed-off-by: Valentin Chevalier <vcr@odoo.com>
This commit is contained in:
committed by
Valentin Chevalier
parent
72f3e40a0c
commit
a7837d3cd9
@@ -2085,6 +2085,13 @@ msgid ""
|
||||
"change the delivery method anymore"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_sale
|
||||
#. odoo-javascript
|
||||
#: code:addons/website_sale/static/src/js/website_sale_utils.js:0
|
||||
#, python-format
|
||||
msgid "Item(s) added to your cart"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_sale
|
||||
#: model:ir.model,name:website_sale.model_account_move
|
||||
msgid "Journal Entry"
|
||||
@@ -4124,10 +4131,13 @@ msgid "Visitor Product Views History"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_sale
|
||||
#. odoo-javascript
|
||||
#: code:addons/website_sale/static/src/js/website_sale_utils.js:0
|
||||
#: model:ir.model.fields,field_description:website_sale.field_sale_order__shop_warning
|
||||
#: model:ir.model.fields,field_description:website_sale.field_sale_order_line__shop_warning
|
||||
#: model_terms:ir.ui.view,arch_db:website_sale.cart_lines
|
||||
#: model_terms:ir.ui.view,arch_db:website_sale.checkout_layout
|
||||
#, python-format
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import wUtils from "@website/js/utils";
|
||||
|
||||
export const cartHandlerMixin = {
|
||||
@@ -118,14 +119,14 @@ function updateCartNavBar(data) {
|
||||
function showCartNotification(callService, props, options = {}) {
|
||||
// Show the notification about the cart
|
||||
if (props.lines) {
|
||||
callService("cartNotificationService", "add", "Item(s) added to your cart", {
|
||||
callService("cartNotificationService", "add", _t("Item(s) added to your cart"), {
|
||||
lines: props.lines,
|
||||
currency_id: props.currency_id,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
if (props.warning) {
|
||||
callService("cartNotificationService", "add", "Warning", {
|
||||
callService("cartNotificationService", "add", _t("Warning"), {
|
||||
warning: props.warning,
|
||||
...options,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user