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.functional import curry
|
||||||
from django.utils.text import capfirst, get_text_list
|
from django.utils.text import capfirst, get_text_list
|
||||||
from django.utils.translation import ugettext as _
|
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
|
from django.utils.encoding import force_unicode
|
||||||
try:
|
try:
|
||||||
set
|
set
|
||||||
|
@ -937,7 +937,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
name = force_unicode(opts.verbose_name)
|
name = force_unicode(opts.verbose_name)
|
||||||
else:
|
else:
|
||||||
name = force_unicode(opts.verbose_name_plural)
|
name = force_unicode(opts.verbose_name_plural)
|
||||||
msg = ngettext("%(count)s %(name)s was changed successfully.",
|
msg = ungettext("%(count)s %(name)s was changed successfully.",
|
||||||
"%(count)s %(name)s were changed successfully.",
|
"%(count)s %(name)s were changed successfully.",
|
||||||
changecount) % {'count': changecount,
|
changecount) % {'count': changecount,
|
||||||
'name': name,
|
'name': name,
|
||||||
|
|
Loading…
Reference in New Issue