#19300: capfirst filter breaks translation context in template
-------------------------------------+-------------------------------------
     Reporter:  dyve                 |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Template system      |                  Version:  1.4
     Severity:  Normal               |               Resolution:
     Keywords:  trans context        |  worksforme
  capfirst                           |             Triage Stage:
    Has patch:  0                    |  Unreviewed
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => worksforme
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I can't reproduce the issue on master.

 With this template and the appropriate French translations:
 {{{
 {% trans "species" %}
 # works as expected, results in translation of 'species'

 {% trans "species" context "singular" %}
 # works as expected, results in translation of 'species' with context
 'singular'

 {% trans "species"|capfirst %}
 # works as expected, results in translation of 'species' without context,
 capfirst applied

 {% trans "species"|capfirst context "singular" %}
 # works as expected, results in translation of 'species' with context
 'singular', capfirst applied
 }}}
 I get this output:
 {{{
 espèces # works as expected, results in translation of 'species'

 espèce # works as expected, results in translation of 'species' with
 context 'singular'

 Espèces # works as expected, results in translation of 'species' without
 context, capfirst applied

 Espèce # works as expected, results in translation of 'species' with
 context 'singular', capfirst applied
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19300#comment:1>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to