Index: trunk/extensions/Translate/FFS.php |
— | — | @@ -298,6 +298,9 @@ |
299 | 299 | } |
300 | 300 | |
301 | 301 | public function readFromVariable( $data ) { |
| 302 | + // Add trailing comma to last key pair. |
| 303 | + $data = str_replace( "\"\n};", "\",\n};", $data ); |
| 304 | + |
302 | 305 | // Just get relevant data. |
303 | 306 | $dataStart = strpos( $data, '{' ); |
304 | 307 | $dataEnd = strrpos( $data, '}' ); |
— | — | @@ -330,12 +333,7 @@ |
331 | 334 | // Remove quotation marks and syntax. |
332 | 335 | $key = substr( $key, 1 ); |
333 | 336 | $value = substr( $value, 1, - 1 ); |
334 | | - $messages[ $key ] = $value; |
335 | | - |
336 | | - // Hack. |
337 | | - if ( $key === 'filterEvaluateNotImplemented' ) { |
338 | | - $messages[ $key ] = substr( $value, 0, - 2 ); |
339 | | - } |
| 337 | + $messages[ $key ] = self::unescapeJsString( $value ); |
340 | 338 | } |
341 | 339 | |
342 | 340 | // Remove extraneous key that is sometimes present. |
— | — | @@ -692,4 +690,4 @@ |
693 | 691 | static $i = 0; |
694 | 692 | return "\x7fUNIQ" . dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) ) . $i++; |
695 | 693 | } |
696 | | -} |
\ No newline at end of file |
| 694 | +} |