Fixes #6107 and #6112: yii message was emptying existing translations and incorrectly writing not yet translated strings in .po in case of multiple categories

This commit is contained in:
Alexander Makarov
2014-11-21 20:19:32 +03:00
parent bc4a12f1d3
commit fb2dff8528
2 changed files with 5 additions and 3 deletions

View File

@@ -408,11 +408,11 @@ EOD;
$merged = [];
$notTranslatedYet = [];
$todos = [];
$hasSomethingToWrite = false;
foreach ($messages as $category => $msgs) {
$notTranslatedYet = [];
$msgs = array_values(array_unique($msgs));
if (is_file($file)) {
@@ -425,7 +425,7 @@ EOD;
sort($msgs);
foreach ($msgs as $message) {
$merged[$category . chr(4) . $message] = '';
$merged[$category . chr(4) . $message] = $existingMessages[$message];
}
ksort($merged);
continue;