From a5f6234970db0d4b443d7730839ed531ca99096a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 6 Mar 2007 17:45:28 +0100 Subject: [PATCH] [svn] improved exception for trans --HG-- branch : trunk --- jinja/parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jinja/parser.py b/jinja/parser.py index a257985..064419a 100644 --- 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': -- 2.26.2