http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71005
Revision: 71005 Author: siebrand Date: 2010-08-13 05:48:20 +0000 (Fri, 13 Aug 2010) Log Message: ----------- * use tab to indent in JavaScriptFFS::writeReal() * update add some brackets Modified Paths: -------------- trunk/extensions/Translate/FFS.php Modified: trunk/extensions/Translate/FFS.php =================================================================== --- trunk/extensions/Translate/FFS.php 2010-08-13 01:52:30 UTC (rev 71004) +++ trunk/extensions/Translate/FFS.php 2010-08-13 05:48:20 UTC (rev 71005) @@ -163,6 +163,7 @@ if ( $sourceText !== false ) { $sourceData = $this->readFromVariable( $sourceText ); + if ( isset( $sourceData['AUTHORS'] ) ) { $collection->addCollectionAuthors( $sourceData['AUTHORS'] ); } @@ -455,17 +456,21 @@ // Get and write messages. $body = ''; foreach ( $collection as $message ) { - if( strlen( $message->translation() ) === 0 ) continue; + if( strlen( $message->translation() ) === 0 ) { + continue; + } $key = $mangler->unmangle( $message->key() ); $key = $this->transformKey( Xml::escapeJsString( $key ) ); $translation = Xml::escapeJsString( $message->translation() ); - $body .= " {$key}: \"{$translation}\",\n"; + $body .= "\t{$key}: \"{$translation}\",\n"; } - if( strlen( $body ) === 0 ) return false; + if( strlen( $body ) === 0 ) { + return false; + } // Strip last comma, re-add trailing newlines. $body = substr( $body, 0, -2 ); @@ -475,7 +480,9 @@ } protected function authorsList( $authors ) { - if( count( $authors ) === 0 ) return ''; + if( count( $authors ) === 0 ) { + return ''; + } $authorsList = ''; foreach ( $authors as $author ) { @@ -578,7 +585,7 @@ } protected function footer() { - return "};\n"; + return "};\n\n"; } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs