http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65041
Revision: 65041 Author: roberthl Date: 2010-04-14 21:55:57 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Translate extension: Copy changes from the old OpenLayers FFS to the new one. Modified Paths: -------------- trunk/extensions/Translate/FFS.php Modified: trunk/extensions/Translate/FFS.php =================================================================== --- trunk/extensions/Translate/FFS.php 2010-04-14 21:42:37 UTC (rev 65040) +++ trunk/extensions/Translate/FFS.php 2010-04-14 21:55:57 UTC (rev 65041) @@ -298,6 +298,9 @@ } public function readFromVariable( $data ) { + // Add trailing comma to last key pair. + $data = str_replace( "\"\n};", "\",\n};", $data ); + // Just get relevant data. $dataStart = strpos( $data, '{' ); $dataEnd = strrpos( $data, '}' ); @@ -330,12 +333,7 @@ // Remove quotation marks and syntax. $key = substr( $key, 1 ); $value = substr( $value, 1, - 1 ); - $messages[ $key ] = $value; - - // Hack. - if ( $key === 'filterEvaluateNotImplemented' ) { - $messages[ $key ] = substr( $value, 0, - 2 ); - } + $messages[ $key ] = self::unescapeJsString( $value ); } // Remove extraneous key that is sometimes present. @@ -692,4 +690,4 @@ static $i = 0; return "\x7fUNIQ" . dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) ) . $i++; } -} \ No newline at end of file +} _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs