From 0b3fac8992360fe203d8e88caa650aa4a285ddeb Mon Sep 17 00:00:00 2001 From: Michael Barton Date: Mon, 20 Dec 2010 22:10:58 +0000 Subject: [PATCH] add more gettext calls --- swift/proxy/server.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/swift/proxy/server.py b/swift/proxy/server.py index 9f34824c08..af0b1a48cc 100644 --- a/swift/proxy/server.py +++ b/swift/proxy/server.py @@ -172,10 +172,11 @@ class SegmentedIterable(object): raise except Exception, err: if not getattr(err, 'swift_logged', False): - self.controller.app.logger.exception('ERROR: While processing ' - 'manifest /%s/%s/%s %s' % (self.controller.account_name, - self.controller.container_name, - self.controller.object_name, self.controller.trans_id)) + self.controller.app.logger.exception(_('ERROR: While ' + 'processing manifest /%(acc)s/%(cont)s/%(obj)s'), + {'acc': self.controller.account_name, + 'cont': self.controller.container_name, + 'obj': self.controller.object_name}) err.swift_logged = True self.response.status_int = 503 raise @@ -204,10 +205,11 @@ class SegmentedIterable(object): raise except Exception, err: if not getattr(err, 'swift_logged', False): - self.controller.app.logger.exception('ERROR: While processing ' - 'manifest /%s/%s/%s %s' % (self.controller.account_name, - self.controller.container_name, - self.controller.object_name, self.controller.trans_id)) + self.controller.app.logger.exception(_('ERROR: While ' + 'processing manifest /%(acc)s/%(cont)s/%(obj)s'), + {'acc': self.controller.account_name, + 'cont': self.controller.container_name, + 'obj': self.controller.object_name}) err.swift_logged = True self.response.status_int = 503 raise @@ -250,10 +252,11 @@ class SegmentedIterable(object): raise except Exception, err: if not getattr(err, 'swift_logged', False): - self.controller.app.logger.exception('ERROR: While processing ' - 'manifest /%s/%s/%s %s' % (self.controller.account_name, - self.controller.container_name, - self.controller.object_name, self.controller.trans_id)) + self.controller.app.logger.exception(_('ERROR: While ' + 'processing manifest /%(acc)s/%(cont)s/%(obj)s'), + {'acc': self.controller.account_name, + 'cont': self.controller.container_name, + 'obj': self.controller.object_name}) err.swift_logged = True self.response.status_int = 503 raise