mirror of https://github.com/django/django.git
Fixed #10533 -- Worked around an apparent limitation of xgettext.
Looks like we have to use the same format specifiers in both singular and plural forms of a message or the PO file cannot be compiled to MO format. This commit changes one place in admin that was using different specifiers. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4a88785e38
commit
4a67fee785
|
@ -742,11 +742,14 @@ class ModelAdmin(BaseModelAdmin):
|
|||
changecount += 1
|
||||
|
||||
if changecount:
|
||||
msg = ngettext("%(count)s %(singular)s was changed successfully.",
|
||||
"%(count)s %(plural)s were changed successfully.",
|
||||
if changecount == 1:
|
||||
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,
|
||||
'singular': force_unicode(opts.verbose_name),
|
||||
'plural': force_unicode(opts.verbose_name_plural),
|
||||
'name': name,
|
||||
'obj': force_unicode(obj)}
|
||||
self.message_user(request, msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue