From e6412e9f36922ae5655be167e31ce88f0ca2a26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=9A=D0=BE?= =?UTF-8?q?=D0=BD=D0=B5=D0=B2?= Date: Thu, 26 Dec 2013 02:28:35 -0800 Subject: [PATCH] Wrong empty line skipping logic in .po extractor --- Gettext/Extractors/Po.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Gettext/Extractors/Po.php b/Gettext/Extractors/Po.php index 1e85af53..df4e87e7 100644 --- a/Gettext/Extractors/Po.php +++ b/Gettext/Extractors/Po.php @@ -27,10 +27,11 @@ static public function parse ($file, Entries $entries) { $line = self::fixMultiLines($line,$lines,$i); - if ($line === '' && $translation->hasOriginal()) { - $entries[] = $translation; - - $translation = new Translation; + if ($line === '') { + if($translation->hasOriginal()) { + $entries[] = $translation; + $translation = new Translation; + } continue; } list($key, $data) = preg_split('/\s/', $line, 2); @@ -126,4 +127,4 @@ static private function fixMultiLines ($line, Array $lines, &$i) { } return $line; } -} \ No newline at end of file +}