diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2008-04-20 13:11:43 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2008-04-20 13:11:43 +0200 |
commit | f59bac20dff640f8b4156b1a4e4331ea32cbd9af (patch) | |
tree | b8b31bebfcbd2d096b9188a862b786b921b64665 /examples | |
parent | f41d1397f652093e9b3d7978fc32e73b87eeac3b (diff) | |
download | jinja2-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.py | 3 |
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") |