From 0a1681cea806c4baabb2ecf6dbea0eaeec90e983 Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Mon, 21 Jan 2013 09:56:13 +0800 Subject: [PATCH] Fix i18n messages in quantum.api.api_common Change-Id: I30dc9ad76dbfb6cc038c283d81e449cf64d7ffec --- quantum/api/api_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/api/api_common.py b/quantum/api/api_common.py index e9bb12fcfa..2e781e66cb 100644 --- a/quantum/api/api_common.py +++ b/quantum/api/api_common.py @@ -45,15 +45,15 @@ class QuantumController(object): data = body[self._resource_name] except KeyError: # raise if _resource_name is not in req body. - raise exc.HTTPBadRequest("Unable to find '%s' in request body" - % self._resource_name) + raise exc.HTTPBadRequest(_("Unable to find '%s' in request body") % + self._resource_name) for param in params: param_name = param['param-name'] param_value = data.get(param_name, None) # If the parameter wasn't found and it was required, return 400 if param_value is None and param['required']: - msg = ("Failed to parse request. " + - "Parameter: " + param_name + " not specified") + msg = (_("Failed to parse request. " + "Parameter '%s' not specified") % param_name) for line in msg.split('\n'): LOG.error(line) raise exc.HTTPBadRequest(msg)