Commit 4a67fee7 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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
parent 4a88785e
Loading
Loading
Loading
Loading
+117 −114
Original line number Diff line number Diff line
@@ -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)