From ee0cc66657708a251724e131b60d210fcb166da0 Mon Sep 17 00:00:00 2001 From: Marek Snopkowski Date: Tue, 24 Aug 2021 13:50:39 +0200 Subject: [PATCH] Let code "breath" a bit https://github.com/php-translation/symfony-bundle/issues/300 --- Service/Importer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Service/Importer.php b/Service/Importer.php index f90eaa9..ee9334e 100644 --- a/Service/Importer.php +++ b/Service/Importer.php @@ -115,6 +115,7 @@ public function extractToCatalogues(Finder $finder, array $catalogues, array $co } } } + foreach ($merge->getObsoleteMessages($domain) as $key => $translation) { $messageDomain = array_key_exists($key, $resultMessages[$intlDomain] ?? []) ? $intlDomain : $domain; @@ -140,6 +141,7 @@ private function convertSourceLocationsToMessages( foreach ($collection as $sourceLocation) { $context = $sourceLocation->getContext(); $domain = $context['domain'] ?? 'messages'; + // Check with white/black list if (!$this->isValidDomain($domain)) { continue;