8000 [Translation] added xliff loader/dumper with resname support by jfsimon · Pull Request #7304 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Translation] added xliff loader/dumper with resname support #7304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Translation] renamed new xliff loader/dumper
  • Loading branch information
jfsimon committed Mar 8, 2013
commit 4b3b4e38a1c0c3d1b4bf777ed24f56aab7ec1336
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
class XliffFileDumper2 extends XliffFileDumper
class XliffFileWithResnameDumper extends XliffFileDumper
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @api
*/
class XliffFileLoader2 extends XliffFileLoader
class XliffFileWithResnameLoader extends XliffFileLoader
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
namespace Symfony\Component\Translation\Tests\Dumper;

use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Dumper\XliffFileDumper2;
use Symfony\Component\Translation\Dumper\XliffFileWithResnameDumper;

class XliffFileDumper2Test extends \PHPUnit_Framework_TestCase
class XliffFileWithResnameDumperTest extends \PHPUnit_Framework_TestCase
{
public function testDump()
{
$catalogue = new MessageCatalogue('en');
$catalogue->add(array('foo' => 'bar', 'key' => ''));

$tempDir = sys_get_temp_dir();
$dumper = new XliffFileDumper2();
$dumper = new XliffFileWithResnameDumper();
$dumper->dump($catalogue, array('path' => $tempDir));

$this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resname-clean.xlf'), file_get_contents($tempDir.'/messages.en.xlf'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Component\Translation\Tests\Loader;

use Symfony\Component\Translation\Loader\XliffFileLoader2;
use Symfony\Component\Translation\Loader\XliffFileWithResnameLoader;

class XliffFileLoader2Test extends XliffFileLoaderTest
class XliffFileWithResnameLoaderTest extends XliffFileLoaderTest
{
public function testLoadWithResname()
{
Expand All @@ -25,6 +25,6 @@ public function testLoadWithResname()

protected function createLoader()
{
return new XliffFileLoader2();
return new XliffFileWithResnameLoader();
}
}
0