Fix overriding headers in extract-strings console
This commit is contained in:
parent
4ca3fd5a32
commit
b3e0a349c9
|
@ -109,17 +109,17 @@ HELP;
|
||||||
// $updatedPoString = str_replace(realpath(__DIR__ . '/../../../../') . DIRECTORY_SEPARATOR, '', $updatedPoString);
|
// $updatedPoString = str_replace(realpath(__DIR__ . '/../../../../') . DIRECTORY_SEPARATOR, '', $updatedPoString);
|
||||||
// $this->out('Writing ' . realpath($updatedPoFile));
|
// $this->out('Writing ' . realpath($updatedPoFile));
|
||||||
// file_put_contents($updatedPoFile, $updatedPoString);
|
// file_put_contents($updatedPoFile, $updatedPoString);
|
||||||
|
|
||||||
|
$updatedTranslations->setLanguage($locale);
|
||||||
|
|
||||||
if ($this->getOption('force')) {
|
if ($this->getOption('force')) {
|
||||||
$existingTranslations = $updatedTranslations;
|
$existingTranslations = $updatedTranslations;
|
||||||
} else {
|
} else {
|
||||||
$this->out('Merging with existing translations');
|
$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();
|
$poString = $existingTranslations->toPoString();
|
||||||
|
|
||||||
// Strip absolute path to files
|
// Strip absolute path to files
|
||||||
|
|
Loading…
Reference in a new issue