From bc065bda556920a08ede534e740ea7fef1851869 Mon Sep 17 00:00:00 2001 From: "Guillaume (guva)" Date: Mon, 2 Aug 2021 07:49:04 +0000 Subject: [PATCH] [FIX] point_of_sale : enable translated terms Step to reproduce: - Change the language to any language other than english - Go to PoS and open a session - Click on "Client" and select a client - The button 'Select Customer', 'Deselect Customer' and 'Change Customer' are not translated. Cause of the issue - The term 'Change Customer' was missing in pos.pot - Translation was not enabled in JS file This fix complete the one "done" in commit 00e177b opw-2596436 closes odoo/odoo#74565 X-original-commit: da5b236f7375d35309a59d8e548309d5381a81cb Signed-off-by: pimodoo --- addons/point_of_sale/i18n/point_of_sale.pot | 7 +++++++ .../src/js/Screens/ClientListScreen/ClientListScreen.js | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index 47cf86235d4..63e2217ef67 100644 --- a/addons/point_of_sale/i18n/point_of_sale.pot +++ b/addons/point_of_sale/i18n/point_of_sale.pot @@ -687,6 +687,13 @@ msgstr "" msgid "CHANGE" msgstr "" +#. module: point_of_sale +#. openerp-web +#: code:addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js:0 +#, python-format +msgid "Change Customer" +msgstr "" + #. module: point_of_sale #. openerp-web #: code:addons/point_of_sale/static/src/xml/Popups/EditListPopup.xml:0 diff --git a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js index b62c6b959da..4863d588e04 100644 --- a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js @@ -84,11 +84,11 @@ odoo.define('point_of_sale.ClientListScreen', function(require) { */ get nextButton() { if (!this.props.client) { - return { command: 'set', text: 'Set Customer' }; + return { command: 'set', text: this.env._t('Set Customer') }; } else if (this.props.client && this.props.client === this.state.selectedClient) { - return { command: 'deselect', text: 'Deselect Customer' }; + return { command: 'deselect', text: this.env._t('Deselect Customer') }; } else { - return { command: 'set', text: 'Change Customer' }; + return { command: 'set', text: this.env._t('Change Customer') }; } }