$this->assertMsgID('This @node.type is submitted by @author.name, and has a length of: @count. It contains: %node.numbers and @node.bad_text. Lets pass the bad text through: !node.bad_text.');
$this->assertMsgID('This @node.type is submitted by @author.name, and has a length of: @count. It contains: %node.numbers and @node.bad_text.');
$this->assertMsgIDContext('I have context.','Lolspeak');
$this->assertNoMsgIDContext('I have no context.','zz');
$this->assertMsgIDContext('I have context and another parameter.','Lolspeak');
$this->assertMsgID('A multiline\n trans block.');
$this->assertMsgID('Test string with @extra_filter');
$this->assertMsgID('Test string with @multiple_filters');
$this->assertMsgID('Test string with %multiple_filters');
Changes for tests/potx_test_8.html.twig: 16 added lines, 6 removed lines.
Original line number
Diff line number
Diff line
@@ -61,11 +61,6 @@
Escaped: {{string}}
{%endtrans%}
</div>
<div>
{%trans%}
Pass-through: {{string|passthrough}}
{%endtrans%}
</div>
<div>
{%trans%}
Placeholder: {{string|placeholder}}
@@ -77,7 +72,7 @@
{%setcount=token|length%}
<div>
{%trans%}
This {{node.type}} is submitted by {{author.name}}, and has a length of: {{count}}. It contains: {{node.numbers|placeholder}} and {{node.bad_text}}. Lets pass the bad text through: {{node.bad_text|passthrough}}.
This {{node.type}} is submitted by {{author.name}}, and has a length of: {{count}}. It contains: {{node.numbers|placeholder}} and {{node.bad_text}}.
{%endtrans%}
</div>
{# Test trans tag with context. #}
@@ -105,3 +100,18 @@
trans block.
{%endtrans%}
</div>
<div>
{%trans%}
Test string with {{extra_filter|abs}}
{%endtrans%}
</div>
<div>
{%trans%}
Test string with {{multiple_filters|abs|placeholder}}
{%endtrans%}
</div>
<div>
{%trans%}
Test string with {{multiple_filters|placeholder|abs}}