Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a30545c1
authored
May 12, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: plural gettext for mass create / mass delete
parent
577130c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
circle/dashboard/views.py
+9
-4
No files found.
circle/dashboard/views.py
View file @
a30545c1
...
...
@@ -41,6 +41,7 @@ from django.views.generic import (TemplateView, DetailView, View, DeleteView,
UpdateView
,
CreateView
,
ListView
)
from
django.contrib
import
messages
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ungettext
as
__
from
django.template.defaultfilters
import
title
as
title_filter
from
django.template.loader
import
render_to_string
from
django.template
import
RequestContext
...
...
@@ -1410,8 +1411,10 @@ class VmCreate(LoginRequiredMixin, TemplateView):
i
.
deploy
.
async
(
user
=
request
.
user
)
if
len
(
instances
)
>
1
:
messages
.
success
(
request
,
_
(
"Successfully created
%
d VMs."
%
len
(
instances
)))
messages
.
success
(
request
,
__
(
"Successfully created
%(count)
d VM."
,
# this should not happen
"Successfully created
%(count)
d VMs."
,
len
(
instances
))
%
{
'count'
:
len
(
instances
)})
path
=
reverse
(
"dashboard.index"
)
else
:
messages
.
success
(
request
,
_
(
"VM successfully created."
))
...
...
@@ -1844,8 +1847,10 @@ class VmMassDelete(LoginRequiredMixin, View):
except
Exception
as
e
:
logger
.
error
(
e
)
success_message
=
_
(
"Mass delete complete, the following VMs were "
"deleted:
%
s."
)
%
u', '
.
join
(
names
)
success_message
=
__
(
"Mass delete complete, the following VM was deleted:
%
s."
,
"Mass delete complete, the following VMs were deleted:
%
s."
,
len
(
names
))
%
u', '
.
join
(
names
)
# we can get this only via AJAX ...
if
request
.
is_ajax
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment