#11240: Compilemessages fails if a % character is at certain places in the .po 
file
-------------------------------------+-------------------------------------
     Reporter:  tback                |                    Owner:
         Type:  Bug                  |  garcia_marc
    Component:                       |                   Status:  new
  Internationalization               |                  Version:  1.3
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
    Has patch:  1                    |  checkin
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by defaultwombat):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 I have issues with trans tags containing % Symbols using django 1.5.1

 The trans tag doesn't handle a % the same way makemessages does. A `{%
 trans "value in %"}` still looks for a `msgid "value in %"` but
 makemessages created a `msgid "value in %%"` for it.
 The trans tag should implement the same string conversion as makemessage
 does.

 The workaround to already escape the % in the trans tag - `{% trans "value
 in %%"}` - returns the right translation.
 But as the translation will most likely have a "%%" in it the rendered
 conent will have a "%%" too.
 A workaround could be to let the TranslateNode return `value % ()`.

 Currently the only way to avoid issues with % Symbols in translations is
 using blocktrans tags.

 It might be worth monitoring
 http://savannah.gnu.org/bugs/?func=detailitem&item_id=30854 for changes on
 gettext handling python format strings.

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


Reply via email to