Put formatting operation outside localisation call
Otherwise the strings will not be properly extracted for translation. Change-Id: I21a1c56577e7cd9fb2e31fe380b3c3bc8d1c48bf
This commit is contained in:
parent
fe942d3bf6
commit
3021172d9f
@ -55,7 +55,7 @@ class PropertyRules(object):
|
|||||||
conf_file = CONF.find_file(CONF.property_protection_file)
|
conf_file = CONF.find_file(CONF.property_protection_file)
|
||||||
CONFIG.read(conf_file)
|
CONFIG.read(conf_file)
|
||||||
except Exception as e:
|
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))
|
(CONF.property_protection_file, e))
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
||||||
@ -85,7 +85,7 @@ class PropertyRules(object):
|
|||||||
try:
|
try:
|
||||||
return re.compile(rule)
|
return re.compile(rule)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _("Encountered a malformed property protection rule %s:%s."
|
msg = (_("Encountered a malformed property protection rule %s:%s.")
|
||||||
% (rule, e))
|
% (rule, e))
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
raise webob.exc.HTTPInternalServerError(explanation=msg)
|
||||||
|
@ -246,7 +246,7 @@ class ImageCache(object):
|
|||||||
if (image_checksum and
|
if (image_checksum and
|
||||||
image_checksum != current_checksum.hexdigest()):
|
image_checksum != current_checksum.hexdigest()):
|
||||||
msg = _("Checksum verification failed. Aborted "
|
msg = _("Checksum verification failed. Aborted "
|
||||||
"caching of image '%s'." % image_id)
|
"caching of image '%s'.") % image_id
|
||||||
raise exception.GlanceException(msg)
|
raise exception.GlanceException(msg)
|
||||||
|
|
||||||
except exception.GlanceException as e:
|
except exception.GlanceException as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user