Changed placeholders

This commit is contained in:
florianv 2014-03-03 18:14:46 +01:00
parent 623d149cad
commit a04175ec9c
4 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ abstract class FileDumper implements DumperInterface
*
* @var string
*/
protected $relativePathTemplate = '{domain}.{locale}.{extension}';
protected $relativePathTemplate = '%domain%.%locale%.%extension%';
/**
* Sets the template for the relative paths to files.
@ -95,9 +95,9 @@ abstract class FileDumper implements DumperInterface
private function getRelativePath($domain, $locale)
{
return strtr($this->relativePathTemplate, array(
'{domain}' => $domain,
'{locale}' => $locale,
'{extension}' => $this->getExtension()
'%domain%' => $domain,
'%locale%' => $locale,
'%extension%' => $this->getExtension()
));
}
}

View File

@ -23,7 +23,7 @@ class IcuResFileDumper extends FileDumper
/**
* {@inheritDoc}
*/
protected $relativePathTemplate = '{domain}/{locale}.{extension}';
protected $relativePathTemplate = '%domain%/%locale%.%extension%';
/**
* {@inheritDoc}

View File

@ -46,7 +46,7 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
$catalogue->add(array('foo' => 'bar'));
$dumper = new ConcreteFileDumper();
$dumper->setRelativePathTemplate('test/translations/{domain}.{locale}.{extension}');
$dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%');
$dumper->dump($catalogue, array('path' => $tempDir));
$this->assertTrue(file_exists($file));

View File

@ -31,8 +31,8 @@ class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resourcebundle/res/en.res'), file_get_contents($tempDir.'/messages/en.res'));
unlink($tempDir.'/messages/en.res');
rmdir($tempDir.'/messages');
rmdir($tempDir);
@unlink($tempDir.'/messages/en.res');
@rmdir($tempDir.'/messages');
@rmdir($tempDir);
}
}