Fix overriding headers in extract-strings console

This commit is contained in:
Hypolite Petovan 2018-11-17 08:28:04 -05:00
parent 4ca3fd5a32
commit b3e0a349c9

View file

@ -110,16 +110,16 @@ HELP;
// $this->out('Writing ' . realpath($updatedPoFile));
// file_put_contents($updatedPoFile, $updatedPoString);
$updatedTranslations->setLanguage($locale);
if ($this->getOption('force')) {
$existingTranslations = $updatedTranslations;
} else {
$this->out('Merging with existing translations');
$existingTranslations->mergeWith($updatedTranslations, Merge::ADD | Merge::REMOVE | Merge::REFERENCES_THEIRS);
$existingTranslations->mergeWith($updatedTranslations, Merge::ADD | Merge::REMOVE | Merge::REFERENCES_THEIRS | Merge::HEADERS_ADD);
}
$existingTranslations->setLanguage($locale);
$poString = $existingTranslations->toPoString();
// Strip absolute path to files