From a75891e1b64876f5534ce636f6e3559635a3f57e Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Mon, 18 Feb 2013 11:24:02 +0530 Subject: [PATCH] [FIX]Fixed the issue of translation of POS action buttons. bzr revid: msh@openerp.com-20130218055402-zaxa2g6c4o0t6cu5 --- addons/point_of_sale/static/src/js/screens.js | 11 ++++++----- addons/point_of_sale/static/src/js/widgets.js | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index eca4a3c5915..457457b2969 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -16,7 +16,8 @@ // hide()s function openerp_pos_screens(instance, module){ //module is instance.point_of_sale - var QWeb = instance.web.qweb; + var QWeb = instance.web.qweb, + _t = instance.web._t; module.ScreenSelector = instance.web.Class.extend({ init: function(options){ @@ -808,13 +809,13 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa var self = this; this.add_action_button({ - label: 'Print', + label: _t('Print'), icon: '/point_of_sale/static/src/img/icons/png48/printer.png', click: function(){ self.print(); }, }); this.add_action_button({ - label: 'Next Order', + label: _t('Next Order'), icon: '/point_of_sale/static/src/img/icons/png48/go-next.png', click: function() { self.finishOrder(); }, }); @@ -870,7 +871,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.set_numpad_state(this.pos_widget.numpad.state); this.back_button = this.add_action_button({ - label: 'Back', + label: _t('Back'), icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png', click: function(){ self.pos_widget.screen_selector.set_current_screen(self.back_screen); @@ -878,7 +879,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }); this.validate_button = this.add_action_button({ - label: 'Validate', + label: _t('Validate'), name: 'validation', icon: '/point_of_sale/static/src/img/icons/png48/validate.png', click: function(){ diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 874c387ea23..b7cedcf548c 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -1,5 +1,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sale - var QWeb = instance.web.qweb; + var QWeb = instance.web.qweb, + _t = instance.web._t; // The ImageCache is used to hide the latency of the application cache on-disk access in chrome // that causes annoying flickering on product pictures. Why the hell a simple access to @@ -969,7 +970,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.onscreen_keyboard.appendTo($(".point-of-sale #content")); this.close_button = new module.HeaderButtonWidget(this,{ - label:'Close', + label: _t('Close'), action: function(){ self.try_close(); }, }); this.close_button.appendTo(this.$('#rightheader'));