Rename xliff files to xlf

This commit is contained in:
Romain Neutron
2014-02-11 13:33:09 +01:00
parent 302e87714f
commit b819de9a54
16 changed files with 2378 additions and 2704 deletions

View File

@@ -334,14 +334,14 @@ class Application extends SilexApplication
]);
$this['translator'] = $this->share($this->extend('translator', function (CachedTranslator $translator, $app) {
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/messages.fr.xliff', 'fr', 'messages');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/validators.fr.xliff', 'fr', 'validators');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/messages.en.xliff', 'en', 'messages');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/validators.en.xliff', 'en', 'validators');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/messages.de.xliff', 'de', 'messages');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/validators.de.xliff', 'de', 'validators');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/messages.nl.xliff', 'nl', 'messages');
$translator->addResource('xliff', __DIR__.'/../../../resources/locales/validators.nl.xliff', 'nl', 'validators');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/messages.fr.xlf', 'fr', 'messages');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/validators.fr.xlf', 'fr', 'validators');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/messages.en.xlf', 'en', 'messages');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/validators.en.xlf', 'en', 'validators');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/messages.de.xlf', 'de', 'messages');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/validators.de.xlf', 'de', 'validators');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/messages.nl.xlf', 'nl', 'messages');
$translator->addResource('xlf', __DIR__.'/../../../resources/locales/validators.nl.xlf', 'nl', 'validators');
return $translator;
}));

View File

@@ -33,10 +33,9 @@ class TranslationDumper extends Command
foreach (array_keys($this->container->getAvailableLanguages()) as $code) {
$builder = new ConfigBuilder();
$config = $builder->setLocale($code)
->setOutputFormat('xliff')
->setOutputFormat('xlf')
->setTranslationsDir(__DIR__ . '/../../../../../resources/locales')
->setScanDirs([
$this->container['root.path'].'/templates/web/admin/user',
$this->container['root.path'].'/lib',
$this->container['root.path'].'/templates',
$this->container['root.path'].'/bin',

View File

@@ -71,7 +71,7 @@ class TranslationExtractorServiceProvider implements ServiceProviderInterface
$app['translation-extractor.writers'] = $app->share(function () {
return [
'po' => new SymfonyDumperAdapter(new PoFileDumper(), 'po'),
'xliff' => new XliffDumper(),
'xlf' => new XliffDumper(),
];
});
@@ -81,7 +81,7 @@ class TranslationExtractorServiceProvider implements ServiceProviderInterface
$app['translation-extractor.loaders'] = $app->share(function () {
return [
'po' => new SymfonyLoaderAdapter(new PoFileLoader()),
'xliff' => new XliffLoader()
'xlf' => new XliffLoader()
];
});

View File

@@ -32,7 +32,10 @@ class TranslationServiceProvider implements ServiceProviderInterface
$translator->setFallbackLocales($app['locale_fallbacks']);
$translator->addLoader('array', new ArrayLoader());
// to load Symfony resources
$translator->addLoader('xliff', new XliffLoader());
// to load Phraseanet resources
$translator->addLoader('xlf', new XliffLoader());
foreach ($app['translator.domains'] as $domain => $data) {
foreach ($data as $locale => $messages) {

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2013-12-03T15:07:20Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<file date="2014-02-11T14:21:21Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2013-12-03T15:08:56Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<file date="2014-02-11T14:23:06Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2013-12-03T15:10:48Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<file date="2014-02-11T14:25:05Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2013-12-03T15:13:04Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<file date="2014-02-11T14:27:16Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>