#28711: unordered_list template filter does not work with lazy translations
---------------------------------+--------------------------------------
     Reporter:  Jonas Haag       |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Template system  |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by Jonas Haag:

Old description:

> I would expect that the following assertion holds true:
>
> {{
> from django.utils.translation import ugettext_lazy as _
> from django.template.defaultfilters import unordered_list
>
> assert unordered_list(['', _('lazy')]) == unordered_list(['', 'lazy']))
> }}
>
> I.e., `unordered_list` handles lazy translations as if they were strings.
>
> This used to work in Django < 1.8, more specifically before the patch to
> this ticket: https://code.djangoproject.com/ticket/23260
>
> This bug exists in all versions 1.8–master.
>
> Pull request follows.

New description:

 I would expect that the following assertion holds true:

 {{{
 from django.utils.translation import ugettext_lazy as _
 from django.template.defaultfilters import unordered_list

 assert unordered_list(['', _('lazy')]) == unordered_list(['', 'lazy']))
 }}}

 I.e., `unordered_list` handles lazy translations as if they were strings.

 This used to work in Django < 1.8, more specifically before the patch to
 this ticket: https://code.djangoproject.com/ticket/23260

 This bug exists in all versions 1.8–master.

 Pull request follows.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28711#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 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/067.6ed42c7182a14bd25862790637e0f315%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to