Browse Source

fix translations + better alert message.

pull/447/head
François Kawala 5 years ago
parent
commit
c880ef8673
  1. 20
      pos_barcode_tare/i18n/fr_CH.po
  2. 18
      pos_barcode_tare/i18n/pos_barcode_tare.pot
  3. 17
      pos_barcode_tare/static/src/js/pos_barcode_tare.js

20
pos_barcode_tare/i18n/fr_CH.po

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n" "Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-05 08:11+0000\n"
"PO-Revision-Date: 2020-02-05 08:11+0000\n"
"POT-Creation-Date: 2020-02-05 18:22+0000\n"
"PO-Revision-Date: 2020-02-05 18:22+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -38,8 +38,8 @@ msgstr "Erreur d'unitée de mesure"
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:83
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:83
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:89
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:89
#, python-format #, python-format
msgid "Negative weight" msgid "Negative weight"
msgstr "Poids négatif" msgstr "Poids négatif"
@ -89,19 +89,19 @@ msgstr "Tare"
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:84
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:84
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:90
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:90
#, python-format #, python-format
msgid "The calculated weight is negative. Did you scan the correct tare label?" msgid "The calculated weight is negative. Did you scan the correct tare label?"
msgstr "Le poids net calculé est négatif. Avez vous scanné la bonne étiquette de tare?" msgstr "Le poids net calculé est négatif. Avez vous scanné la bonne étiquette de tare?"
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:73
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:73
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74
#, python-format #, python-format
msgid "You scanned a tare barcode. The tare is applied to the last product in order. We can not apply the tare to this product."
msgstr "Vous avez scanné un code barre de tare. La tare est appliquée au dernier article de la commande. Nous ne pouvons pas appliquer la tare à ce produit."
msgid "You scanned a tare barcode. The tare should apply to \"%s %s of %s\". We do not know how to convert kg to %s. We can not apply the tare to this product."
msgstr "Vous avez scanné une étiquette de tare. La tare devrait être appliquée à \"%s %s de %s\". Nous ne savons pas convertir des kg en %s. La tare ne peut pas être appliqué à ce produit."
#. module: pos_barcode_tare #. module: pos_barcode_tare
#: model:ir.model,name:pos_barcode_tare.model_barcode_rule #: model:ir.model,name:pos_barcode_tare.model_barcode_rule

18
pos_barcode_tare/i18n/pos_barcode_tare.pot

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n" "Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-05 08:11+0000\n"
"PO-Revision-Date: 2020-02-05 08:11+0000\n"
"POT-Creation-Date: 2020-02-05 18:22+0000\n"
"PO-Revision-Date: 2020-02-05 18:22+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -38,8 +38,8 @@ msgstr ""
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:83
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:83
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:89
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:89
#, python-format #, python-format
msgid "Negative weight" msgid "Negative weight"
msgstr "" msgstr ""
@ -89,18 +89,18 @@ msgstr ""
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:84
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:84
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:90
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:90
#, python-format #, python-format
msgid "The calculated weight is negative. Did you scan the correct tare label?" msgid "The calculated weight is negative. Did you scan the correct tare label?"
msgstr "" msgstr ""
#. module: pos_barcode_tare #. module: pos_barcode_tare
#. openerp-web #. openerp-web
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:73
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:73
#: code:addons/addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74
#: code:addons/pos_barcode_tare/static/src/js/pos_barcode_tare.js:74
#, python-format #, python-format
msgid "You scanned a tare barcode. The tare is applied to the last product in order. We can not apply the tare to this product."
msgid "You scanned a tare barcode. The tare should apply to \"%s %s of %s\". We do not know how to convert kg to %s. We can not apply the tare to this product."
msgstr "" msgstr ""
#. module: pos_barcode_tare #. module: pos_barcode_tare

17
pos_barcode_tare/static/src/js/pos_barcode_tare.js

@ -70,9 +70,16 @@ odoo.define('pos_barcode_tare.screens', function (require) {
if (typeof tare_in_product_uom === 'undefined') { if (typeof tare_in_product_uom === 'undefined') {
this.gui.show_popup('error', this.gui.show_popup('error',
{'title': _t('Mismatch in units of measure'), {'title': _t('Mismatch in units of measure'),
'body': _t('You scanned a tare barcode. ' +
'The tare is applied to the last product in order. '+
'We can not apply the tare to this product.')});
'body':
_.str.sprintf(
_t('You scanned a tare barcode. ' +
'The tare should apply to "%s %s of %s". '+
'We do not know how to convert kg to %s. ' +
'We can not apply the tare to this product.'),
total_weight,
product_unit.name,
last_order_line.product.display_name,
product_unit.name)});
return; return;
} }
// Computes the paid (net) weight. // Computes the paid (net) weight.
@ -223,9 +230,9 @@ odoo.define('pos_barcode_tare.screens', function (require) {
print: function () { print: function () {
// See comment in print function of ReceiptScreenWidget // See comment in print function of ReceiptScreenWidget
this.lock_screen(true); this.lock_screen(true);
var self = this;
setTimeout(function () { setTimeout(function () {
this.lock_screen(false);
self.lock_screen(false);
}, 1000); }, 1000);
this.print_web(); this.print_web();

Loading…
Cancel
Save