Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms-admin: Fixed #7564 -- Make position argument string interpol…

…ation use keywords instead. Works better for translators and get rid of make-messages.py warnings. Thanks Marc Garcia for the report and permon for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7d45454e55d9eca6afb725d8869aad3946c9b65c 1 parent d9a2441
@brosner brosner authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 django/contrib/admin/options.py
View
18 django/contrib/admin/options.py
@@ -427,17 +427,17 @@ def save_change(self, request, model, form, formsets=None):
if formsets:
for formset in formsets:
for added_object in formset.new_objects:
- change_message.append(_('Added %s "%s".')
- % (added_object._meta.verbose_name, added_object))
+ change_message.append(_('Added %(name)s "%(object)s".')
+ % {'name': added_object._meta.verbose_name, % 'object': added_object})
for changed_object, changed_fields in formset.changed_objects:
- change_message.append(_('Changed %s for %s "%s".')
- % (get_text_list(changed_fields, _('and')),
- changed_object._meta.verbose_name,
- changed_object))
+ change_message.append(_('Changed %(list)s for %(name)s "%(object)s".')
+ % {'list': get_text_list(changed_fields, _('and')),
+ 'name': changed_object._meta.verbose_name,
+ 'object': changed_object})
for deleted_object in formset.deleted_objects:
- change_message.append(_('Deleted %s "%s".')
- % (deleted_object._meta.verbose_name, deleted_object))
-
+ change_message.append(_('Deleted %(name)s "%(object)s".')
+ % {'name': deleted_object._meta.verbose_name,
+ 'object': deleted_object})
change_message = ' '.join(change_message)
if not change_message:
change_message = _('No fields changed.')
Please sign in to comment.
Something went wrong with that request. Please try again.