Provide a clearer error message when message in trans tag is not a simple text.
This commit is contained in:
parent
e54f4e46c9
commit
190024aeeb
@ -62,7 +62,7 @@ class TransTokenParser extends \Twig_TokenParser
|
||||
$body = $this->parser->subparse(array($this, 'decideTransFork'), true);
|
||||
|
||||
if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) {
|
||||
throw new \Twig_Error_Syntax('A message must be a simple text');
|
||||
throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text');
|
||||
}
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
|
Reference in New Issue
Block a user