[TwigBridge][Trans]set %count% only on transChoice
This commit is contained in:
parent
78649a804d
commit
d176ffca51
@ -98,7 +98,7 @@ class TransNode extends \Twig_Node
|
|||||||
foreach ($matches[1] as $var) {
|
foreach ($matches[1] as $var) {
|
||||||
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
|
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
|
||||||
if (!$vars->hasElement($key)) {
|
if (!$vars->hasElement($key)) {
|
||||||
if ('count' === $var) {
|
if ('count' === $var && null !== $this->getNode('count')) {
|
||||||
$vars->addElement($this->getNode('count'), $key);
|
$vars->addElement($this->getNode('count'), $key);
|
||||||
} else {
|
} else {
|
||||||
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());
|
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());
|
||||||
|
Reference in New Issue
Block a user