mirror of
https://github.com/django/django.git
synced 2025-05-07 23:46:30 +00:00
Fixed #10897 -- Modified use of ngettext to ungettext in admin change messages. Thanks to zuber for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9d28568cb4
commit
31c833f113
@ -18,7 +18,7 @@ from django.utils.safestring import mark_safe
|
||||
from django.utils.functional import curry
|
||||
from django.utils.text import capfirst, get_text_list
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ngettext, ugettext_lazy
|
||||
from django.utils.translation import ungettext, ugettext_lazy
|
||||
from django.utils.encoding import force_unicode
|
||||
try:
|
||||
set
|
||||
@ -937,11 +937,11 @@ class ModelAdmin(BaseModelAdmin):
|
||||
name = force_unicode(opts.verbose_name)
|
||||
else:
|
||||
name = force_unicode(opts.verbose_name_plural)
|
||||
msg = ngettext("%(count)s %(name)s was changed successfully.",
|
||||
"%(count)s %(name)s were changed successfully.",
|
||||
changecount) % {'count': changecount,
|
||||
'name': name,
|
||||
'obj': force_unicode(obj)}
|
||||
msg = ungettext("%(count)s %(name)s was changed successfully.",
|
||||
"%(count)s %(name)s were changed successfully.",
|
||||
changecount) % {'count': changecount,
|
||||
'name': name,
|
||||
'obj': force_unicode(obj)}
|
||||
self.message_user(request, msg)
|
||||
|
||||
return HttpResponseRedirect(request.get_full_path())
|
||||
|
Loading…
x
Reference in New Issue
Block a user