Merge lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh into lp:openobject-addons/7.0

Proposed by Mohammed Shekha(Open ERP) on 2013-02-18
Status: Merged
Approved by: Naresh(OpenERP) on 2013-04-11
Approved revision: no longer in the source branch.
Merged at revision: 9210
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh
Merge into: lp:openobject-addons/7.0
Diff against target: 68 lines (+9/-7)
2 files modified
point_of_sale/static/src/js/screens.js (+6/-5)
point_of_sale/static/src/js/widgets.js (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) 2013-02-18 Approve on 2013-04-11
Review via email: mp+148987@code.launchpad.net

Description of the change

Hello,

Fixed the issue of translation of POS action buttons.

Demo:- Go to POS front end interface, create one order and select journal, the buttons Back, Validate, Print, Next Order is not tranlsated, so used _t translation database.

Thanks.

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'point_of_sale/static/src/js/screens.js'
2--- point_of_sale/static/src/js/screens.js 2013-01-29 14:01:46 +0000
3+++ point_of_sale/static/src/js/screens.js 2013-02-18 06:28:23 +0000
4@@ -16,7 +16,8 @@
5 // hide()s
6
7 function openerp_pos_screens(instance, module){ //module is instance.point_of_sale
8- var QWeb = instance.web.qweb;
9+ var QWeb = instance.web.qweb,
10+ _t = instance.web._t;
11
12 module.ScreenSelector = instance.web.Class.extend({
13 init: function(options){
14@@ -808,13 +809,13 @@
15 var self = this;
16
17 this.add_action_button({
18- label: 'Print',
19+ label: _t('Print'),
20 icon: '/point_of_sale/static/src/img/icons/png48/printer.png',
21 click: function(){ self.print(); },
22 });
23
24 this.add_action_button({
25- label: 'Next Order',
26+ label: _t('Next Order'),
27 icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',
28 click: function() { self.finishOrder(); },
29 });
30@@ -870,7 +871,7 @@
31 this.set_numpad_state(this.pos_widget.numpad.state);
32
33 this.back_button = this.add_action_button({
34- label: 'Back',
35+ label: _t('Back'),
36 icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',
37 click: function(){
38 self.pos_widget.screen_selector.set_current_screen(self.back_screen);
39@@ -878,7 +879,7 @@
40 });
41
42 this.validate_button = this.add_action_button({
43- label: 'Validate',
44+ label: _t('Validate'),
45 name: 'validation',
46 icon: '/point_of_sale/static/src/img/icons/png48/validate.png',
47 click: function(){
48
49=== modified file 'point_of_sale/static/src/js/widgets.js'
50--- point_of_sale/static/src/js/widgets.js 2013-01-29 14:01:46 +0000
51+++ point_of_sale/static/src/js/widgets.js 2013-02-18 06:28:23 +0000
52@@ -1,5 +1,6 @@
53 function openerp_pos_widgets(instance, module){ //module is instance.point_of_sale
54- var QWeb = instance.web.qweb;
55+ var QWeb = instance.web.qweb,
56+ _t = instance.web._t;
57
58 // The ImageCache is used to hide the latency of the application cache on-disk access in chrome
59 // that causes annoying flickering on product pictures. Why the hell a simple access to
60@@ -969,7 +970,7 @@
61 this.onscreen_keyboard.appendTo($(".point-of-sale #content"));
62
63 this.close_button = new module.HeaderButtonWidget(this,{
64- label:'Close',
65+ label: _t('Close'),
66 action: function(){ self.try_close(); },
67 });
68 this.close_button.appendTo(this.$('#rightheader'));