8000 [Translator] Warm up the translations cache in dev by tgalopin · Pull Request #30921 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

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

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Translator] Warm up the translations cache in dev
  • Loading branch information
tgalopin committed Apr 6, 2019
commit a5f1afca15e26b1b886d85a357e1370d7c479e47
11 changes: 10 additions & 1 deletion src/Symfony/Component/Translation/DataCollectorTranslator.php
Original file line number Diff line number Diff line change
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