#18881: tag "trans" not working with "context"
------------------------------------+--------------------------------------
     Reporter:  lanyjie             |                    Owner:  nobody
         Type:  Bug                 |                   Status:  new
    Component:  Template system     |                  Version:  1.4
     Severity:  Normal              |               Resolution:
     Keywords:  trans context i18n  |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------

Comment (by lanyjie):

 I would love to try write a unit test if someone can give me an example
 for the i18n module. For now, I can specify how to reproduce this problem:

 1. in a django project, write a real simple template file named
 "testempt.html" with two lines like this:
 {{{
     {%trans "budget" context "finance"%}

     "{%trans 'budget' context 'finance'%}"
 }}}
 2. now issue this command:
 {{{
     python manage.py makemessages -l en
 }}}
 3. then open the message file django.po and you will get this:
 {{{
 #: testempt.html:1
 msgctxt "finance"
 msgid "budget"
 msgstr ""

 #: testempt.html:3
 msgid "budget"
 msgstr ""
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18881#comment:5>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to