PoFileDumper example

'sources' => [
                'src/file_1',
                'src/file_2:50',
            ],
        ]);
        $catalogue->setMetadata('bar_foo', [
            'comments' => 'Comment',
            'flags' => 'fuzzy',
            'sources' => 'src/file_1',
        ]);

        $dumper = new PoFileDumper();

        $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.po', $dumper->formatCatalogue($catalogue, 'messages'));
    }

    public function testDumpPlurals()
    {
        $catalogue = new MessageCatalogue('en');
        $catalogue->add([
            'foo|foos' => 'bar|bars',
            '{0} no foos|one foo|%count% foos' => '{0} no bars|one bar|%count% bars',
        ]);

        
Home | Imprint | This part of the site doesn't use cookies.