From 2a0ffb7df396015fe9ea948c89a3f2c5b7b97f33 Mon Sep 17 00:00:00 2001 From: tarokkk <tarokkk@cloud.ik.bme.hu> Date: Thu, 4 Apr 2013 16:48:08 +0200 Subject: [PATCH] webui: Fixed typo and plural translation variables. --- one/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/one/views.py b/one/views.py index 9786e72..4f827e7 100644 --- a/one/views.py +++ b/one/views.py @@ -491,14 +491,17 @@ def vm_unshare(request, id, *args, **kwargs): m = s.get_running_or_stopped() if n > 0: messages.error(request, ungettext_lazy('There is a machine running of this share.', - 'There are %d machines running of this share.', n) % n) + 'There are %(n)d machines running of this share.', n) % + {'n' : n}) elif m > 0: - messages.error(request, ungettext_lazy('There is a suspended machines of this share.', - 'There are %d suspended machines of this share.', m) % m) + messages.error(request, ungettext_lazy('There is a suspended machine of this share.', + 'There are %(m)d suspended machines of this share.', m) % + {'m' : m}) else: s.delete() messages.success(request, _('Share is successfully removed.')) - except: + except Exception as e: + print e messages.error(request, _('Failed to remove share.')) return redirect(g) -- libgit2 0.26.0