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 d1e02e0 commit 4b06a12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@

{{ "foo.bar4" | transchoice(5, {'%name%': 'Johannes'}, 'app') }}

{% trans %}text.default_domain{% endtrans %}
{% 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 @@ -166,6 +166,10 @@ public function testExtractSimpleTemplate()
$message->addSource($fileSourceFactory->create($fixtureSplInfo, 21));
$expected->add($message);

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

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

Expand Down

0 comments on commit 4b06a12

Please sign in to comment.