Skip to content

Commit

Permalink
Fix named parameter used for trans filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p committed Aug 21, 2024
1 parent 0774a85 commit d1e02e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
{{ "foo.bar4" | trans({'%count%': 5, '%name%': 'Johannes'}, 'app') }}

{% trans %}text.default_domain{% endtrans %}

{{ "foo.bar5"|trans(domain='app') }}
4 changes: 4 additions & 0 deletions Tests/Translation/Extractor/File/TwigFileExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public function testExtractSimpleTemplateInSF5()
$message->addSource($fileSourceFactory->create($fixtureSplInfo, 19));
$expected->add($message);

$message = new Message('foo.bar5', 'app');
$message->addSource($fileSourceFactory->create($fixtureSplInfo, 21));
$expected->add($message);

$this->assertEquals($expected, $this->extract('simple_template_sf5.html.twig'));
}

Expand Down

0 comments on commit d1e02e0

Please sign in to comment.