mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
success message converted to translate ready
This commit is contained in:
parent
5d4a600908
commit
ba212971fa
1 changed files with 3 additions and 4 deletions
|
@ -155,7 +155,7 @@ def storage(request, compute_id, pool):
|
||||||
meta_prealloc = True
|
meta_prealloc = True
|
||||||
try:
|
try:
|
||||||
conn.create_volume(data['name'], data['size'], data['format'], meta_prealloc)
|
conn.create_volume(data['name'], data['size'], data['format'], meta_prealloc)
|
||||||
messages.success(request, "Image file {} is created successfully".format(data['name']+".img"))
|
messages.success(request, _("Image file {} is created successfully".format(data['name']+".img")))
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
@ -167,7 +167,7 @@ def storage(request, compute_id, pool):
|
||||||
try:
|
try:
|
||||||
vol = conn.get_volume(volname)
|
vol = conn.get_volume(volname)
|
||||||
vol.delete(0)
|
vol.delete(0)
|
||||||
messages.success(request,_('Volume: {} is deleted.'.format(volname)))
|
messages.success(request, _('Volume: {} is deleted.'.format(volname)))
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err.message)
|
error_messages.append(lib_err.message)
|
||||||
|
@ -197,8 +197,7 @@ def storage(request, compute_id, pool):
|
||||||
format = None
|
format = None
|
||||||
try:
|
try:
|
||||||
conn.clone_volume(data['image'], data['name'], format, meta_prealloc)
|
conn.clone_volume(data['image'], data['name'], format, meta_prealloc)
|
||||||
messages.success(request, _("{} image cloned as {} successfully".format(data['image'],
|
messages.success(request, _("{} image cloned as {} successfully".format(data['image'], data['name'] + ".img")))
|
||||||
data['name'] + ".img")))
|
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
Loading…
Reference in a new issue