$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.'
);
return 0;
} $resultMessage = 'Translation files were successfully updated';