private function parseCatalogue(MessageCatalogueInterface $catalogue) { foreach ($catalogue->all() as $domain => $messages) { foreach ($messages as $id => $translation) { if (preg_match(self::REFERENCE_REGEX, $translation, $matches)) { $catalogue->set($id, $this->getTranslation($catalogue, $id, $domain), $domain); } } } }