Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
jinja
/
2e9396ba8f6cfa9007d29724c6a14d3905078bcf
/
.
/
examples
/
translate.py
blob: 8b38d02ea7d4fd46b24d94a763df0846c96e07c1 [
file
] [
log
] [
blame
]
from
jinja2
import
Environment
print
Environment
().
from_string
(
"""\
{% trans %}Hello {{ user }}!{% endtrans %}
{% trans count=users|count %}{{ count }} user{% pluralize %}{{ count }} users{% endtrans %}
"""
).
render
()