#13568: KeyError raised in template rendering when the number of placeholders
differs between singular and plural
----------------------------------+-----------------------------------------
 Reporter:  deloide               |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  Internationalization  |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 Here is a simple example to reproduce the bug:

 template file: index.html

 {{{
 {% load i18n %}

 {% blocktrans with myextra_field as extra_field and myamount as amount
 count myyears as years %}
 That will cost $ {{ amount }} per year. {{ extra_field }}
 {% plural %}
 That will cost $ {{ amount }} per {{ years }} years.
 {% endblocktrans %}
 }}}

 views.py:

 {{{
 from django.http import HttpResponse
 from django.template import Context, loader
 from django.http import HttpResponse
 def index(request):
     t = loader.get_template('index.html')
     c = Context({
           'myamount' : 10,
           'myyears' : 1,
           'myextra_field' : 2,
     })
     return HttpResponse(t.render(c))
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13568>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to