8000 Always extract message text from the t() Twig function · symfony/symfony@be782ca · GitHub
[go: up one dir, main page]

Skip to content

Commit be782ca

Browse files
committed
Always extract message text from the t() Twig function
1 parent 6e9d169 commit be782ca

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ protected function doEnterNode(Node $node, Environment $env): Node
6868
$this->getReadDomainFromArguments($node->getNode('arguments'), 1),
6969
];
7070
} elseif (
71-
$node instanceof FilterExpression &&
72-
'trans' === $node->getNode('filter')->getAttribute('value') &&
73-
$node->getNode('node') instanceof FunctionExpression &&
74-
't' === $node->getNode('node')->getAttribute('name')
71+
$node instanceof FunctionExpression &&
72+
't' === $node->getAttribute('name')
7573
) {
76-
$nodeArguments = $node->getNode('node')->getNode('arguments');
74+
$nodeArguments = $node->getNode('arguments');
7775

7876
if ($nodeArguments->getIterator()->current() instanceof ConstantExpression) {
7977
$this->messages[] = [

0 commit comments

Comments
 (0)
0