MediaWikiExtensionMessageGroup.php

Go to the documentation of this file.
00001 <?php
00015 class MediaWikiExtensionMessageGroup extends SingleFileBasedMessageGroup {
00022     public function getDescription( IContextSource $context = null ) {
00023         $language = $this->getSourceLanguage();
00024         if ( $context ) {
00025             $language = $context->getLanguage()->getCode();
00026         }
00027 
00028         $msgkey = $this->getFromConf( 'BASIC', 'descriptionmsg' );
00029         $desc = '';
00030         if ( $msgkey ) {
00031             $desc = $this->getMessage( $msgkey, $language );
00032             if ( strval( $desc ) === '' ) {
00033                 $desc = $this->getMessage( $msgkey, $this->getSourceLanguage() );
00034             }
00035         }
00036 
00037         if ( strval( $desc ) === '' ) {
00038             // That failed, default to 'description'
00039             $desc = parent::getDescription( $context );
00040         }
00041 
00042         $url = $this->getFromConf( 'BASIC', 'extensionurl' );
00043         if ( $url ) {
00044             $desc .= "\n\n$url";
00045         }
00046 
00047         return $desc;
00048     }
00049 }
Generated on Tue Oct 29 00:00:24 2013 for MediaWiki Translate Extension by  doxygen 1.6.3