[Validator] fixed Xliff loader to use forward slashes in file path

This commit is contained in:
Bulat Shakirzyanov 2010-09-08 10:57:29 -04:00 committed by Fabien Potencier
parent 1aefe7a762
commit bb51e7cb26

View File

@ -59,7 +59,7 @@ class XliffMessageInterpolator implements MessageInterpolatorInterface
throw new \Exception(implode("\n", $this->getXmlErrors()));
}
$parts = explode('/', __DIR__.'/schema/dic/xliff-core/xml.xsd');
$parts = explode('/', str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd');
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
$location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));