Hey Jinja list,
I just noticed that I could be using trans tags instead of explicitly
calling gettext in my Jinja templates. Then I thought about something like
the following case:
{{ _('Check out the <a href="/docs">docs</a>.') | safe }}
Explicitly calling gettext means I can easily put a filter on the
expression, specifically "safe" in this case, so that the markup in the
expression is not escaped. This wouldn't work as nicely using trans tags
instead. Is this an indication that putting markup inside a translatable
string is bad practice? What's the best practice in this case?
Thanks!
Josh
P.S. By the way, I've been meaning to ask: Is the Jinja2 logo a character
from another language? It's a cool logo, and I'm curious to know if it means
anything.
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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 this group at
http://groups.google.com/group/pocoo-libs?hl=en.