Skip to content

Commit fb47657

Browse files
author
Oscar Otero
authored
Merge pull request #263 from lbfeenix/master
Multiline disabled translations
2 parents 219a7e6 + fcb8f3b commit fb47657

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Loader/PoLoader.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ public function loadString(string $string, Translations $translations = null): T
2626
//Multiline
2727
while (substr($line, -1, 1) === '"'
2828
&& $nextLine !== false
29-
&& substr(trim($nextLine), 0, 1) === '"'
29+
&& (substr(trim($nextLine), 0, 1) === '"' || substr(trim($nextLine), 0, 4) === '#~ "')
3030
) {
31-
$line = substr($line, 0, -1).substr(trim($nextLine), 1);
31+
if (substr(trim($nextLine), 0, 1) === '"') { // Normal multiline
32+
$line = substr($line, 0, -1).substr(trim($nextLine), 1);
33+
} elseif (substr(trim($nextLine), 0, 4) === '#~ "') { // Disabled multiline
34+
$line = substr($line, 0, -1).substr(trim($nextLine), 4);
35+
}
3236
$nextLine = next($lines);
3337
}
3438

0 commit comments

Comments
 (0)