Merge lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525 into lp:ocb-web

Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525
Merge into: lp:ocb-web
Diff against target: 33 lines (+5/-4)
1 file modified
addons/web/ (+5/-4)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Stefan Rijnhart (Opener) Pending
OpenERP Community Reviewer/Maintainer Pending
Review via email:

Description of the change

Allows the title of warning boxes such as except_orm to be translated.

Prerequisite for displaying translated values:

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)
4173. By Sandy Carter (

[IMP] Use english translatable string in error popups

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

please make a pull request for if you still consider this fix relevant.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Development for 7.0 has moved to github on - please move your merge proposal there if it is still valid.

(I close and reject this in order to have a cleaner overview for 6.1 MPs which indeed have to be done on launchpad)

review: Disapprove

Unmerged revisions

4173. By Sandy Carter (

[IMP] Use english translatable string in error popups

4172. By Sandy Carter (

Made Error messages translatable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/'
--- addons/web/ 2013-05-14 10:37:36 +0000
+++ addons/web/ 2014-04-30 15:36:22 +0000
@@ -8,6 +8,7 @@
8import xmlrpclib8import xmlrpclib
10import openerp10import openerp
11from import _
12_logger = logging.getLogger(__name__)13_logger = logging.getLogger(__name__)
@@ -84,17 +85,17 @@
84 self.jsonp_requests = {} # FIXME use a LRU85 self.jsonp_requests = {} # FIXME use a LRU
86 def send(self, service_name, method, *args):87 def send(self, service_name, method, *args):
87 code_string = u"warning -- %s\n\n%s"88 code_string = _(u"warning -- %s\n\n%s")
88 try:89 try:
89 return openerp.netsvc.dispatch_rpc(service_name, method, args)90 return openerp.netsvc.dispatch_rpc(service_name, method, args)
90 except openerp.osv.osv.except_osv, e:91 except openerp.osv.osv.except_osv, e:
91 raise xmlrpclib.Fault(code_string % (, e.value), '')92 raise xmlrpclib.Fault(code_string % (, e.value), '')
92 except openerp.exceptions.Warning, e:93 except openerp.exceptions.Warning, e:
93 raise xmlrpclib.Fault(code_string % ("Warning", e), '')94 raise xmlrpclib.Fault(code_string % (_("Warning"), e), '')
94 except openerp.exceptions.AccessError, e:95 except openerp.exceptions.AccessError, e:
95 raise xmlrpclib.Fault(code_string % ("AccessError", e), '')96 raise xmlrpclib.Fault(code_string % (_("Access Error"), e), '')
96 except openerp.exceptions.AccessDenied, e:97 except openerp.exceptions.AccessDenied, e:
97 raise xmlrpclib.Fault('AccessDenied', raise xmlrpclib.Fault(_('Access Denied'),
98 except openerp.exceptions.DeferredException, e:99 except openerp.exceptions.DeferredException, e:
99 formatted_info = "".join(traceback.format_exception(*e.traceback))100 formatted_info = "".join(traceback.format_exception(*e.traceback))
100 raise xmlrpclib.Fault(, formatted_info)101 raise xmlrpclib.Fault(, formatted_info)