summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2008-04-20 13:11:43 +0200
committerArmin Ronacher <armin.ronacher@active-4.com>2008-04-20 13:11:43 +0200
commitf59bac20dff640f8b4156b1a4e4331ea32cbd9af (patch)
treeb8b31bebfcbd2d096b9188a862b786b921b64665 /examples
parentf41d1397f652093e9b3d7978fc32e73b87eeac3b (diff)
downloadjinja2-f59bac20dff640f8b4156b1a4e4331ea32cbd9af.tar.gz
added first code for parser extensions and moved some code in speedups around
--HG-- branch : trunk
Diffstat (limited to 'examples')
-rw-r--r--examples/translate.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/translate.py b/examples/translate.py
index 9043a21..0169c88 100644
--- a/examples/translate.py
+++ b/examples/translate.py
@@ -1,7 +1,6 @@
from jinja2 import Environment
-print Environment().from_string("""\
-{{ foo.bar }}
+print Environment(parser_extensions=['jinja2.i18n.trans']).from_string("""\
{% trans %}Hello {{ user }}!{% endtrans %}
{% trans count=users|count %}{{ count }} user{% pluralize %}{{ count }} users{% endtrans %}
""").render(user="someone")