Skip to content

Commit

Permalink
Convert yaml translations to xliff
Browse files Browse the repository at this point in the history
  • Loading branch information
KikiLittlePanda committed Aug 23, 2024
1 parent 00bbd10 commit f7e2f0f
Show file tree
Hide file tree
Showing 5 changed files with 1,017 additions and 373 deletions.
6 changes: 3 additions & 3 deletions tests/Fixtures/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

final class Services
{
private const TRANSLATION_CATALOG = __DIR__ . '/../../translations/PrestaMailReceiverBundle.fr.yaml';
private const TRANSLATION_CATALOG = __DIR__ . '/../../translations/PrestaMailReceiverBundle.fr.xlf';

private static $services = [];

public static function translator(): TranslatorInterface
{
if (!isset(self::$services[__FUNCTION__])) {
self::$services[__FUNCTION__] = $translator = new Translator('fr_FR');
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml', self::TRANSLATION_CATALOG, 'fr_FR', 'PrestaMailReceiverBundle');
$translator->addLoader('xliff', new XliffFileLoader());
$translator->addResource('xliff', self::TRANSLATION_CATALOG, 'fr_FR', 'PrestaMailReceiverBundle');
}

return self::$services[__FUNCTION__];
Expand Down
Loading

0 comments on commit f7e2f0f

Please sign in to comment.