openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #06422
[Merge] lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525 into lp:ocb-web
You have been requested to review the proposed merge of lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525 into lp:ocb-web.
For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525/+merge/212739
Allows the title of warning boxes such as except_orm to be translated.
Prerequisite for displaying translated values:
https://code.launchpad.net/~savoirfairelinux-openerp/ocb-server/translate_warnings_1297525-trunk/+merge/212736
--
https://code.launchpad.net/~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525/+merge/212739
Your team OpenERP Community Reviewer/Maintainer is requested to review the proposed merge of lp:~savoirfairelinux-openerp/ocb-web/translate_warnings_1297525 into lp:ocb-web.
=== modified file 'addons/web/session.py'
--- addons/web/session.py 2013-05-14 10:37:36 +0000
+++ addons/web/session.py 2014-03-25 22:25:56 +0000
@@ -8,6 +8,7 @@
import xmlrpclib
import openerp
+from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
@@ -84,17 +85,17 @@
self.jsonp_requests = {} # FIXME use a LRU
def send(self, service_name, method, *args):
- code_string = u"warning -- %s\n\n%s"
+ code_string = _(u"warning -- %s\n\n%s")
try:
return openerp.netsvc.dispatch_rpc(service_name, method, args)
except openerp.osv.osv.except_osv, e:
raise xmlrpclib.Fault(code_string % (e.name, e.value), '')
except openerp.exceptions.Warning, e:
- raise xmlrpclib.Fault(code_string % ("Warning", e), '')
+ raise xmlrpclib.Fault(code_string % (_("Warning"), e), '')
except openerp.exceptions.AccessError, e:
- raise xmlrpclib.Fault(code_string % ("AccessError", e), '')
+ raise xmlrpclib.Fault(code_string % (_("AccessError"), e), '')
except openerp.exceptions.AccessDenied, e:
- raise xmlrpclib.Fault('AccessDenied', openerp.tools.ustr(e))
+ raise xmlrpclib.Fault(_('AccessDenied'), openerp.tools.ustr(e))
except openerp.exceptions.DeferredException, e:
formatted_info = "".join(traceback.format_exception(*e.traceback))
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
References