mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-14 11:18:23 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user