Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translator] Warm up the translations cache in dev #30921

Merged
merged 1 commit into from Apr 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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