Browse Source

FIX bugs

Remove paiment method from LCD message
Add missing POT file
Update FR translation
pull/10/head
Alexis de Lattre 10 years ago
parent
commit
3deb9f864e
  1. 58
      pos_customer_display/i18n/fr.po
  2. 96
      pos_customer_display/i18n/pos_customer_display.pot
  3. 23
      pos_customer_display/static/src/js/customer_display.js

58
pos_customer_display/i18n/fr.po

@ -1,14 +1,14 @@
# Translation of OpenERP Server.
# Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * pos_customer_display # * pos_customer_display
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: OpenERP Server 9.0alpha1\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-21 10:50+0000\n"
"PO-Revision-Date: 2014-07-21 10:50+0000\n"
"Last-Translator: <>\n"
"POT-Creation-Date: 2014-10-24 12:05+0000\n"
"PO-Revision-Date: 2014-10-24 12:05+0000\n"
"Last-Translator: Alexis de Lattre <alexis.delattre@akretion.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -17,14 +17,14 @@ msgstr ""
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:72
#: code:addons/pos_customer_display/static/src/js/customer_display.js:47
#, python-format #, python-format
msgid "***"
msgstr "***"
msgid "Cancel Payment"
msgstr "Paiement annulé"
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:161
#: code:addons/pos_customer_display/static/src/js/customer_display.js:157
#: field:pos.config,iface_customer_display:0 #: field:pos.config,iface_customer_display:0
#, python-format #, python-format
msgid "Customer display" msgid "Customer display"
@ -32,27 +32,20 @@ msgstr "Afficheur client"
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:32
#, python-format
msgid "Delete item"
msgstr "Suppression article"
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:47
#: code:addons/pos_customer_display/static/src/js/customer_display.js:31
#, python-format #, python-format
msgid "Delete payment"
msgstr "Suppression paiement"
msgid "Delete Item"
msgstr "Article supprimé"
#. module: pos_customer_display #. module: pos_customer_display
#: help:pos.config,iface_customer_display:0 #: help:pos.config,iface_customer_display:0
msgid "Display data on the customer display" msgid "Display data on the customer display"
msgstr "Afficher les info sur l'afficheur client"
msgstr "Utiliser l'afficheur client"
#. module: pos_customer_display #. module: pos_customer_display
#: help:pos.config,customer_display_line_length:0 #: help:pos.config,customer_display_line_length:0
msgid "Length of the LEDs lines of the customer display" msgid "Length of the LEDs lines of the customer display"
msgstr "Longueur des lignes de l'afficheur client, nombre de caractères"
msgstr "Longueur des lignes de l'afficheur client: nombre de caractères"
#. module: pos_customer_display #. module: pos_customer_display
#: field:pos.config,customer_display_line_length:0 #: field:pos.config,customer_display_line_length:0
@ -61,14 +54,14 @@ msgstr "Longueur des lignes"
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:67
#: code:addons/pos_customer_display/static/src/js/customer_display.js:60
#, python-format #, python-format
msgid "Next customer..."
msgstr "Client suivant..."
msgid "Next Customer"
msgstr "Client suivant"
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:164
#: code:addons/pos_customer_display/static/src/js/customer_display.js:160
#, python-format #, python-format
msgid "Offline" msgid "Offline"
msgstr "Hors ligne" msgstr "Hors ligne"
@ -82,9 +75,9 @@ msgstr "Paiement :"
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:71
#: code:addons/pos_customer_display/static/src/js/customer_display.js:66
#, python-format #, python-format
msgid "Point of sale closed"
msgid "Point of Sale Closed"
msgstr "Caisse fermée" msgstr "Caisse fermée"
#. module: pos_customer_display #. module: pos_customer_display
@ -96,13 +89,8 @@ msgstr "TOTAL : "
#. module: pos_customer_display #. module: pos_customer_display
#. openerp-web #. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:62
#: code:addons/pos_customer_display/static/src/js/customer_display.js:54
#, python-format #, python-format
msgid "YOUR CHANGE :"
msgstr "VOTRE MONNAIE :"
#. module: pos_customer_display
#: model:ir.model,name:pos_customer_display.model_pos_config
msgid "pos.config"
msgstr "pos.config"
msgid "Your Change:"
msgstr "Monnaie à rendre :"

96
pos_customer_display/i18n/pos_customer_display.pot

@ -0,0 +1,96 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_customer_display
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-24 12:04+0000\n"
"PO-Revision-Date: 2014-10-24 12:04+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:47
#, python-format
msgid "Cancel Payment"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:157
#: field:pos.config,iface_customer_display:0
#, python-format
msgid "Customer display"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:31
#, python-format
msgid "Delete Item"
msgstr ""
#. module: pos_customer_display
#: help:pos.config,iface_customer_display:0
msgid "Display data on the customer display"
msgstr ""
#. module: pos_customer_display
#: help:pos.config,customer_display_line_length:0
msgid "Length of the LEDs lines of the customer display"
msgstr ""
#. module: pos_customer_display
#: field:pos.config,customer_display_line_length:0
msgid "Line length"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:60
#, python-format
msgid "Next Customer"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:160
#, python-format
msgid "Offline"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:40
#, python-format
msgid "Payment:"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:66
#, python-format
msgid "Point of Sale Closed"
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:39
#, python-format
msgid "TOTAL: "
msgstr ""
#. module: pos_customer_display
#. openerp-web
#: code:addons/pos_customer_display/static/src/js/customer_display.js:54
#, python-format
msgid "Your Change:"
msgstr ""

23
pos_customer_display/static/src/js/customer_display.js

@ -28,23 +28,22 @@ openerp.pos_customer_display = function(instance){
// first click on the backspace button set the amount to 0 => we can't precise the deleted qunatity and price // first click on the backspace button set the amount to 0 => we can't precise the deleted qunatity and price
var line = data['line']; var line = data['line'];
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.align_center(_t("Delete item"), line_length),
this.proxy.align_center(_t("Delete Item"), line_length),
this.proxy.align_center(line.get_product().name, line_length) this.proxy.align_center(line.get_product().name, line_length)
); );
} else if (type == 'addPaymentline') { } else if (type == 'addPaymentline') {
var cashregister = data['cashregister'];
var total = this.get('selectedOrder').getTotalTaxIncluded().toFixed(currency_rounding); var total = this.get('selectedOrder').getTotalTaxIncluded().toFixed(currency_rounding);
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.align_left(_t("TOTAL: "), line_length - 1 - total.length) + ' ' + total,
this.proxy.align_left(_t("Payment:"), line_length - 1 - cashregister.journal_id[1].length) + ' ' + cashregister.journal_id[1]
this.proxy.align_left(_t("TOTAL: "), line_length),
this.proxy.align_right(total, line_length)
); );
} else if (type == 'removePaymentline') { } else if (type == 'removePaymentline') {
var line = data['line']; var line = data['line'];
var amount = line.get_amount().toFixed(currency_rounding); var amount = line.get_amount().toFixed(currency_rounding);
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.align_center(_t("Delete payment"), line_length),
this.proxy.align_center(_t("Cancel Payment"), line_length),
this.proxy.align_left(line.cashregister.journal_id[1] , line_length - 1 - amount.length) + ' ' + amount this.proxy.align_left(line.cashregister.journal_id[1] , line_length - 1 - amount.length) + ' ' + amount
); );
@ -57,14 +56,14 @@ openerp.pos_customer_display = function(instance){
} else if (type == 'pushOrder') { } else if (type == 'pushOrder') {
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.align_center(_t("Next customer"), line_length),
''
this.proxy.align_center(_t("Next Customer"), line_length),
this.proxy.align_left(' ', line_length)
); );
} else if (type = 'closePOS') { } else if (type = 'closePOS') {
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.align_center(_t("Point of sale closed"), line_length),
''
this.proxy.align_center(_t("Point of Sale Closed"), line_length),
this.proxy.align_left(' ', line_length)
); );
} else { } else {
console.warn('Unknown message type'); console.warn('Unknown message type');
@ -82,13 +81,13 @@ openerp.pos_customer_display = function(instance){
send_text_customer_display: function(data, line_length){ send_text_customer_display: function(data, line_length){
//FIXME : this function is call twice. The first time, it is not called by prepare_text_customer_display : WHY ? //FIXME : this function is call twice. The first time, it is not called by prepare_text_customer_display : WHY ?
if (_.isEmpty(data) || data.length != 2 || data[0].length != line_length || data[1].length != line_length){ if (_.isEmpty(data) || data.length != 2 || data[0].length != line_length || data[1].length != line_length){
console.warn("Bad Data argument. Data = " + data);
console.warn('Line_length = ' + line_length);
console.warn("send_text_customer_display: Bad Data argument. Data=" + data + ' line_length=' + line_length);
} else { } else {
// alert(JSON.stringify(data)); // alert(JSON.stringify(data));
return this.message('send_text_customer_display', {'text_to_display' : JSON.stringify(data)}); return this.message('send_text_customer_display', {'text_to_display' : JSON.stringify(data)});
} }
}, },
align_left: function(string, length){ align_left: function(string, length){
if (string) { if (string) {
if (string.length > length) if (string.length > length)
@ -104,6 +103,7 @@ openerp.pos_customer_display = function(instance){
} }
return string; return string;
}, },
align_right: function(string, length){ align_right: function(string, length){
if (string) { if (string) {
if (string.length > length) if (string.length > length)
@ -119,6 +119,7 @@ openerp.pos_customer_display = function(instance){
} }
return string; return string;
}, },
align_center: function(string, length){ align_center: function(string, length){
if (string) { if (string) {
if (string.length > length) if (string.length > length)

Loading…
Cancel
Save