Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Brian Rosner authored July 09, 2008

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. 18  django/contrib/admin/options.py
18  django/contrib/admin/options.py
@@ -427,17 +427,17 @@ def save_change(self, request, model, form, formsets=None):
427 427
         if formsets:
428 428
             for formset in formsets:
429 429
                 for added_object in formset.new_objects:
430  
-                    change_message.append(_('Added %s "%s".') 
431  
-                                          % (added_object._meta.verbose_name, added_object))
  430
+                    change_message.append(_('Added %(name)s "%(object)s".') 
  431
+                                          % {'name': added_object._meta.verbose_name, % 'object': added_object})
432 432
                 for changed_object, changed_fields in formset.changed_objects:
433  
-                    change_message.append(_('Changed %s for %s "%s".') 
434  
-                                          % (get_text_list(changed_fields, _('and')), 
435  
-                                             changed_object._meta.verbose_name, 
436  
-                                             changed_object))
  433
+                    change_message.append(_('Changed %(list)s for %(name)s "%(object)s".') 
  434
+                                          % {'list': get_text_list(changed_fields, _('and')), 
  435
+                                             'name': changed_object._meta.verbose_name, 
  436
+                                             'object': changed_object})
437 437
                 for deleted_object in formset.deleted_objects:
438  
-                    change_message.append(_('Deleted %s "%s".') 
439  
-                                          % (deleted_object._meta.verbose_name, deleted_object))
440  
-            
  438
+                    change_message.append(_('Deleted %(name)s "%(object)s".') 
  439
+                                          % {'name': deleted_object._meta.verbose_name,
  440
+                                             'object': deleted_object})
441 441
         change_message = ' '.join(change_message)
442 442
         if not change_message:
443 443
             change_message = _('No fields changed.')

0 notes on commit 7d45454

Please sign in to comment.
Something went wrong with that request. Please try again.