[FIX] point_of_sale: Translate the popup number buttons

Steps to reproduce the bug:
- Change the language in odoo preferences (e.g: FR)
- Go to pos app > Configuration > Point of sale
- Choose anyone > Edit > Enable “Global discounts” option
- Open new session with the same pos
- Click on “Discount”
- The button "cancel", “confirm” and "ok" are not translated

opw-2615309

closes odoo/odoo#74641

X-original-commit: ace4ac0568c63aef2bcb41f7c613a7f1275a092a
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
This commit is contained in:
Touati Djamel (otd)
2021-08-03 14:18:15 +00:00
parent daee4bf8d1
commit 69a62c5b6d
2 changed files with 12 additions and 3 deletions
@@ -1059,6 +1059,13 @@ msgstr ""
msgid "Confirm"
msgstr ""
#. module: point_of_sale
#. openerp-web
#: code:addons/point_of_sale/static/src/js/Popups/NumberPopup.js:0
#, python-format
msgid "Confirm ?"
msgstr ""
#. module: point_of_sale
#: model_terms:ir.ui.view,arch_db:point_of_sale.pos_config_view_form
msgid "Connect devices to your PoS directly without an IoT Box"
@@ -1,5 +1,7 @@
odoo.define('point_of_sale.NumberPopup', function(require) {
'use strict';
var core = require('web.core');
var _t = core._t;
const { useState } = owl;
const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup');
@@ -62,9 +64,9 @@ odoo.define('point_of_sale.NumberPopup', function(require) {
}
NumberPopup.template = 'NumberPopup';
NumberPopup.defaultProps = {
confirmText: 'Ok',
cancelText: 'Cancel',
title: 'Confirm ?',
confirmText: _t('Ok'),
cancelText: _t('Cancel'),
title: _t('Confirm ?'),
body: '',
cheap: false,
startingValue: null,