Skip to content

Commit a339d92

Browse files
committed
Fixed empty translations load
1 parent 0fcd8e6 commit a339d92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Extractors/Mo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ public static function fromString($string, Translations $translations = null, $f
5555
$stream->seekto($table_translations[$next + 2]);
5656
$translated = $stream->read($table_translations[$next + 1]);
5757

58-
if ($translated === '') {
59-
continue;
60-
}
61-
6258
if ($original === '') {
6359
// Headers
6460
foreach (explode("\n", $translated) as $headerLine) {
@@ -93,6 +89,10 @@ public static function fromString($string, Translations $translations = null, $f
9389

9490
$translation = $translations->insert($context, $original, $plural);
9591

92+
if ($translated === '') {
93+
continue;
94+
}
95+
9696
if ($plural === '') {
9797
$translation->setTranslation($translated);
9898
continue;

0 commit comments

Comments
 (0)