Index: trunk/extensions/Translate/ffs/Gettext.php |
— | — | @@ -22,8 +22,10 @@ |
23 | 23 | return ''; |
24 | 24 | } |
25 | 25 | $data = file_get_contents( $this->filename ); |
26 | | - $length = strpos( $data, "msgid" ); |
27 | | - return substr( $data, 0, $length ); |
| 26 | + $start = (int) strpos( $data, '# --'); |
| 27 | + if ( $start ) $start += 5; |
| 28 | + $end = (int) strpos( $data, "msgid" ); |
| 29 | + return substr( $data, $start, $end-$start ); |
28 | 30 | } |
29 | 31 | |
30 | 32 | public function parseFile() { |