mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +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:
		| @@ -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,11 +937,11 @@ 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, | ||||||
|                                                    'obj': force_unicode(obj)} |                                                     'obj': force_unicode(obj)} | ||||||
|                     self.message_user(request, msg) |                     self.message_user(request, msg) | ||||||
|  |  | ||||||
|                 return HttpResponseRedirect(request.get_full_path()) |                 return HttpResponseRedirect(request.get_full_path()) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user