8000 [Translator] Warm up the translations cache in dev · symfony/symfony@a5f1afc · GitHub
[go: up one dir, main page]

Skip to content

Commit a5f1afc

Browse files
committed
[Translator] Warm up the translations cache in dev
1 parent 86210b3 commit a5f1afc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Symfony/Component/Translation/DataCollectorTranslator.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
namespace Symfony\Component\Translation;
1313

14+
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
1415
use Symfony\Component\Translation\Exception\InvalidArgumentException;
1516

1617
/**
1718
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
1819
*/
19-
class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface
20+
class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface, WarmableInterface
2021
{
2122
const MESSAGE_DEFINED = 0;
2223
const MESSAGE_MISSING = 1;
@@ -87,6 +88,14 @@ public function getCatalogue($locale = null)
8788
return $this->translator->getCatalogue($locale);
8889
}
8990

91+
/**
92+
* {@inheritdoc}
93+
*/
94+
public function warmUp($cacheDir)
95+
{
96+
return $this->translator->warmUp($cacheDir);
97+
}
98+
9099
/**
91100
* Gets the fallback locales.
92101
*

0 commit comments

Comments
 (0)
0