Skip to content
Myr

[svn] improved exception for trans

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 68c8725 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:jinja/parser.py+3 added-2 removed
309 unmodified lines
310 raise TemplateSyntaxError('unregistered translation '311 'variable %r.' % variable_name,312 lineno)313 if self.tokenstream.next()[1] != 'variable_end':314 raise TemplateSyntaxError('invalid syntax for variable '315 'expression.', lineno)314 raise TemplateSyntaxError('you cannot use variable expressions '315 'inside trans tags. apply filters '316 'in the trans header.', lineno)317 buf.append('%%(%s)s' % variable_name)318 # nested blocks are not supported, just look for end blocks319 elif token == 'block_begin':320 _, block_token, block_name = self.tokenstream.next()
169 unmodified lines