Revision: 51634 Author: siebrand Date: 2009-06-09 10:51:19 +0000 (Tue, 09 Jun 2009)
Log Message: ----------- Add support for Wikiblame (http://wikipedia.ramselehof.de/wikiblame.php) Modified Paths: -------------- trunk/extensions/Translate/_autoload.php Added Paths: ----------- trunk/extensions/Translate/groups/Wikiblame.php Modified: trunk/extensions/Translate/_autoload.php =================================================================== --- trunk/extensions/Translate/_autoload.php 2009-06-09 10:10:03 UTC (rev 51633) +++ trunk/extensions/Translate/_autoload.php 2009-06-09 10:51:19 UTC (rev 51634) @@ -84,6 +84,7 @@ $wgAutoloadClasses['MantisMessageGroup'] = $dir . 'groups/Mantis.php'; $wgAutoloadClasses['NoccMessageGroup'] = $dir . 'groups/Nocc.php'; $wgAutoloadClasses['OpenLayersMessageGroup'] = $dir . 'groups/OpenLayers.php'; +$wgAutoloadClasses['WikiblameMessageGroup'] = $dir . 'groups/Wikiblame.php'; # complex messages $wgAutoloadClasses['ComplexMessages'] = $dir . 'groups/ComplexMessages.php'; Added: trunk/extensions/Translate/groups/Wikiblame.php =================================================================== --- trunk/extensions/Translate/groups/Wikiblame.php (rev 0) +++ trunk/extensions/Translate/groups/Wikiblame.php 2009-06-09 10:51:19 UTC (rev 51634) @@ -0,0 +1,47 @@ +<?php +/** + * Support Wikiblame: http://wikipedia.ramselehof.de/wikiblame.php. + * + * @addtogroup Extensions + * + * @copyright Copyright © 2009, Siebrand Mazeland + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + * + */ + +class WikiblameMessageGroup extends MessageGroup { + protected $label = 'Wikiblame'; + protected $id = 'out-wikiblame'; + protected $type = 'wikiblame'; + + protected $fileDir = '__BUG__'; + + public function getPath() { return $this->fileDir; } + public function setPath( $value ) { $this->fileDir = $value; } + + protected $optional = array(); + + public $header = '<?php +/** Wikiblame + * + */'; + + public function getMessageFile( $code ) { + if ( isset( $this->codeMap[$code] ) ) { + $code = $this->codeMap[$code]; + } + return "$code.php"; + } + + protected function getFileLocation( $code ) { + return $this->fileDir . '/' . $this->getMessageFile( $code ); + } + + public function getReader( $code ) { + return new PhpVariablesFormatReader( $this->getFileLocation( $code ) ); + } + + public function getWriter() { + return new PhpVariablesFormatWriter( $this ); + } +} Property changes on: trunk/extensions/Translate/groups/Wikiblame.php ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs