#24292: {% blocktrans with count n=something %} isn't accepted
---------------------------------+--------------------
     Reporter:  mbertheau        |      Owner:  nobody
         Type:  Uncategorized    |     Status:  new
    Component:  Template system  |    Version:  1.7
     Severity:  Normal           |   Keywords:
 Triage Stage:  Unreviewed       |  Has patch:  0
Easy pickings:  0                |      UI/UX:  0
---------------------------------+--------------------
 I find it confusing that you can do `{% blocktrans with foo=bar %}` and
 `{% blocktrans with foo=bar count n=baz %}`, but when you need only the
 counter variable, the `with` has to go: `{% blocktrans count n=baz %}`.

 The documentation doesn't clearly state how `with` and `count` work. As I
 understand now after reading the code, they serve as a marker for the
 following kwargs, where `with` accepts many kwargs, and `count` accepts
 only one.

 In my mental model, `with` and `count` are markers on a different level.
 I'd find this syntax more intuitive:
 {{{
 {% blocktrans with a=foo b=bar %}
 {% blocktrans with a=foo b=bar count n=baz %}
 {% blocktrans with count n=baz %}
 {% blocktrans with a=foo count n=baz b=bar %}
 {% blocktrans with count n=baz a=foo b=bar %}
 }}}
 In all cases `n` is the only plural variable.

--
Ticket URL: <https://code.djangoproject.com/ticket/24292>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.c13f98690a15913886c282a15a1ef3fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to