#25297: The makemessages command does not detect the context of {% trans %}
templatetags with filter
--------------------------------------+--------------------
     Reporter:  apocquet              |      Owner:  nobody
         Type:  Uncategorized         |     Status:  new
    Component:  Internationalization  |    Version:  1.8
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 The following:
 {{{#!html+django
 {% trans 'inactive'|upper context 'plural' %}
 }}}

 Is (incorrectly) extracted as:
 {{{#!po
 msgid "inactive"
 msgstr ""
 }}}

 Whereas the following:
 {{{#!html+django
 {% trans 'inactive' context 'plural' %}
 }}}

 Is (correctly) extracted as:
 {{{#!po
 msgctxt "plural"
 msgid "inactive"
 msgstr ""
 }}}

 Translating the former has no effect on the template rendering, as it
 lacks the context.
 Translating the latter makes the translation to be correctly rendered,
 both without the filter, and with the filter if added '''after'''
 {{{makemessages}}} was called.

 I think this is a bug with the {{{makemessages}}} command.

 Environnement:
 Linux Mint Debian Edition
 CPython 3.4.2
 Django 1.8.3
 GNU gettext 0.19.3

 Command used:
 {{{./manage.py makemessages -v 1 -l fr}}}
 {{{./manage.py compilemessages}}}

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

Reply via email to