Skip to content

Commit dae0501

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [TwigBridge] fix tests Tag the FormFieldRegistry as being internal [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds [Validator] Added missing swedish translation [TranslationDebug] workaround for getFallbackLocales. [Translation] fixed nested fallback catalogue using multiple locales. fixed phpdoc [Command] Fixed method comments as phpDoc syntax
2 parents 4726638 + 1a777a9 commit dae0501

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Command/TranslationDebugCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
use Symfony\Component\Translation\Catalogue\MergeOperation;
2222
use Symfony\Component\Translation\MessageCatalogue;
2323
use Symfony\Component\Translation\Translator;
24+
use Symfony\Component\Translation\DataCollectorTranslator;
25+
use Symfony\Component\Translation\LoggingTranslator;
2426

2527
/**
2628
* Helps finding unused or missing translation messages in a given locale
@@ -301,7 +303,7 @@ private function loadFallbackCatalogues($locale, $transPaths, TranslationLoader
301303
{
302304
$fallbackCatalogues = array();
303305
$translator = $this->getContainer()->get('translator');
304-
if ($translator instanceof Translator) {
306+
if ($translator instanceof Translator || $translator instanceof DataCollectorTranslator || $translator instanceof LoggingTranslator) {
305307
foreach ($translator->getFallbackLocales() as $fallbackLocale) {
306308
if ($fallbackLocale === $locale) {
307309
continue;

0 commit comments

Comments
 (0)