http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59150
Revision: 59150 Author: siebrand Date: 2009-11-16 21:53:26 +0000 (Mon, 16 Nov 2009) Log Message: ----------- Give StringMatcher::emptyMatcher() on getMangler() if mangler not set. Prevents fatal in exporting page translation groups to file. Export result is very basic for page translation now. Should return the raw/rendered wiki text? Modified Paths: -------------- trunk/extensions/Translate/MessageGroups.php trunk/extensions/Translate/Translate.php Modified: trunk/extensions/Translate/MessageGroups.php =================================================================== --- trunk/extensions/Translate/MessageGroups.php 2009-11-16 21:34:25 UTC (rev 59149) +++ trunk/extensions/Translate/MessageGroups.php 2009-11-16 21:53:26 UTC (rev 59150) @@ -61,7 +61,16 @@ * branches one can set a message key mangler. */ protected $mangler = null; - public function getMangler() { return $this->mangler; } + public function getMangler() { + $mangler = $this->mangler; + + if( !$mangler ) { + $mangler = StringMatcher::emptyMatcher(); + } + + return $mangler; + } + public function setMangler( $value ) { $this->mangler = $value; } protected $type = 'undefined'; @@ -442,7 +451,7 @@ public function initCollection( $code, $unique = false ) { $collection = parent::initCollection( $code, $unique ); - + $defs = $this->load( 'en' ); foreach ( $defs as $key => $value ) { $collection[$key] = new FatMessage( $key, implode( ", ", $value ) ); Modified: trunk/extensions/Translate/Translate.php =================================================================== --- trunk/extensions/Translate/Translate.php 2009-11-16 21:34:25 UTC (rev 59149) +++ trunk/extensions/Translate/Translate.php 2009-11-16 21:53:26 UTC (rev 59150) @@ -12,7 +12,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -define( 'TRANSLATE_VERSION', '2009-11-13' ); +define( 'TRANSLATE_VERSION', '2009-11-16' ); $wgExtensionCredits['specialpage'][] = array( 'path' => __FILE__, _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs