Put formatting operation outside localisation call

Otherwise the strings will not be properly extracted
for translation.

Change-Id: I21a1c56577e7cd9fb2e31fe380b3c3bc8d1c48bf
This commit is contained in:
Dirk Mueller 2013-09-07 15:15:56 +02:00 committed by Zhongyue Luo
parent fe942d3bf6
commit 3021172d9f
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class PropertyRules(object):
conf_file = CONF.find_file(CONF.property_protection_file)
CONFIG.read(conf_file)
except Exception as e:
msg = _("Couldn't find property protection file %s:%s." %
msg = (_("Couldn't find property protection file %s:%s.") %
(CONF.property_protection_file, e))
LOG.error(msg)
raise webob.exc.HTTPInternalServerError(explanation=msg)
@ -85,7 +85,7 @@ class PropertyRules(object):
try:
return re.compile(rule)
except Exception as e:
msg = _("Encountered a malformed property protection rule %s:%s."
msg = (_("Encountered a malformed property protection rule %s:%s.")
% (rule, e))
LOG.error(msg)
raise webob.exc.HTTPInternalServerError(explanation=msg)

View File

@ -246,7 +246,7 @@ class ImageCache(object):
if (image_checksum and
image_checksum != current_checksum.hexdigest()):
msg = _("Checksum verification failed. Aborted "
"caching of image '%s'." % image_id)
"caching of image '%s'.") % image_id
raise exception.GlanceException(msg)
except exception.GlanceException as e: