Skip to content

Commit

Permalink
[Translator] Warm up the translations cache in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tgalopin committed Apr 6, 2019
1 parent 86210b3 commit a5f1afc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Symfony/Component/Translation/DataCollectorTranslator.php
Expand Up @@ -11,12 +11,13 @@

namespace Symfony\Component\Translation;

use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
use Symfony\Component\Translation\Exception\InvalidArgumentException;

/**
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
*/
class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface
class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface, WarmableInterface
{
const MESSAGE_DEFINED = 0;
const MESSAGE_MISSING = 1;
Expand Down Expand Up @@ -87,6 +88,14 @@ public function getCatalogue($locale = null)
return $this->translator->getCatalogue($locale);
}

/**
* {@inheritdoc}
*/
public function warmUp($cacheDir)
{
return $this->translator->warmUp($cacheDir);
}

/**
* Gets the fallback locales.
*
Expand Down

0 comments on commit a5f1afc

Please sign in to comment.