'foo' => 'bar',
'key' => '',
'key.with.cdata' => '<source> & <target>',
]);
$catalogue->
setMetadata('foo',
['notes' =>
[['priority' => 1, 'from' => 'bar', 'content' => 'baz'
]]]);
$catalogue->
setMetadata('key',
['notes' =>
[['content' => 'baz'
],
['content' => 'qux'
]]]);
$dumper =
new XliffFileDumper();
$this->
assertStringEqualsFile( __DIR__.'/../fixtures/resources-clean.xlf',
$dumper->
formatCatalogue($catalogue, 'messages',
['default_locale' => 'fr_FR'
]) );
} public function testFormatCatalogueXliff2() { $catalogue =
new MessageCatalogue('en_US'
);
$catalogue->
add([ 'foo' => 'bar',
'key' => '',
'key.with.cdata' => '<source> & <target>',
'translation.key.that.is.longer.than.eighty.characters.should.not.have.name.attribute' => 'value',
]);