Fix i18n issue in volume_action and admin_action

In the files admin_action.py and volume_action.py, we
still missed some i18n issues required to be fixed.

Change-Id: I97f41cc6f5093662aec57290a1972d907b1b27e6
Closes-bug: #1768198
This commit is contained in:
junboli 2018-04-30 23:52:15 +08:00
parent acfe957cb2
commit 02e20cf4f0

View File

@ -229,9 +229,9 @@ class VolumeAdminController(AdminController):
except messaging.RemoteError as error:
if error.exc_type in ['VolumeAttachmentNotFound',
'InvalidVolume']:
msg = "Error force detaching volume - %(err_type)s: " \
"%(err_msg)s" % {'err_type': error.exc_type,
'err_msg': error.value}
msg = _("Error force detaching volume - %(err_type)s: "
"%(err_msg)s") % {'err_type': error.exc_type,
'err_msg': error.value}
raise webob.exc.HTTPBadRequest(explanation=msg)
else:
# There are also few cases where force-detach call could fail