projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68c8725
)
[svn] improved exception for trans
author
Armin Ronacher
<armin.ronacher@active-4.com>
Tue, 6 Mar 2007 16:45:28 +0000
(17:45 +0100)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Tue, 6 Mar 2007 16:45:28 +0000
(17:45 +0100)
--HG--
branch : trunk
jinja/parser.py
patch
|
blob
|
history
diff --git
a/jinja/parser.py
b/jinja/parser.py
index a257985f27606d7868617ef99a0c475a508ae356..064419a5aae6467ce3a521dcbda6bc349a3bff64 100644
(file)
--- a/
jinja/parser.py
+++ b/
jinja/parser.py
@@
-311,8
+311,9
@@
class Parser(object):
'variable %r.' % variable_name,
lineno)
if self.tokenstream.next()[1] != 'variable_end':
- raise TemplateSyntaxError('invalid syntax for variable '
- 'expression.', lineno)
+ raise TemplateSyntaxError('you cannot use variable expressions '
+ 'inside trans tags. apply filters '
+ 'in the trans header.', lineno)
buf.append('%%(%s)s' % variable_name)
# nested blocks are not supported, just look for end blocks
elif token == 'block_begin':