$io->
title('Translation Messages Extractor and Dumper'
);
$io->
comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"',
$input->
getArgument('locale'
),
$currentName));
$io->
comment('Parsing templates...'
);
$extractedCatalogue =
$this->
extractMessages($input->
getArgument('locale'
),
$codePaths,
$input->
getOption('prefix'
));
$io->
comment('Loading translation files...'
);
$currentCatalogue =
$this->
loadCurrentMessages($input->
getArgument('locale'
),
$transPaths);
if (null !==
$domain =
$input->
getOption('domain'
)) { $currentCatalogue =
$this->
filterCatalogue($currentCatalogue,
$domain);
$extractedCatalogue =
$this->
filterCatalogue($extractedCatalogue,
$domain);
} // process catalogues
$operation =
$input->
getOption('clean'
) ?
new TargetOperation($currentCatalogue,
$extractedCatalogue) :
new MergeOperation($currentCatalogue,
$extractedCatalogue);
// Exit if no messages found.
if (!\
count($operation->
getDomains())) { $errorIo->
warning('No translation messages were found.'
);