http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70985

Revision: 70985
Author:   siebrand
Date:     2010-08-12 20:35:12 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
Move WikiBlame to new style message group.

Modified Paths:
--------------
    trunk/extensions/Translate/_autoload.php

Added Paths:
-----------
    trunk/extensions/Translate/groups/WikiBlame/
    trunk/extensions/Translate/groups/WikiBlame/WikiBlame.yml

Removed Paths:
-------------
    trunk/extensions/Translate/groups/Wikiblame.php

Modified: trunk/extensions/Translate/_autoload.php
===================================================================
--- trunk/extensions/Translate/_autoload.php    2010-08-12 20:27:54 UTC (rev 
70984)
+++ trunk/extensions/Translate/_autoload.php    2010-08-12 20:35:12 UTC (rev 
70985)
@@ -96,7 +96,6 @@
 $wgAutoloadClasses['PremadeMediawikiExtensionGroups'] = $dir . 
'groups/MediaWikiExtensions.php';
 $wgAutoloadClasses['PremadeWikiaExtensionGroups'] = $dir . 
'groups/Wikia/WikiaExtensions.php';
 $wgAutoloadClasses['OpenLayersMessageGroup'] = $dir . 'groups/OpenLayers.php';
-$wgAutoloadClasses['WikiblameMessageGroup'] = $dir . 'groups/Wikiblame.php';
 $wgAutoloadClasses['MediaWikiMessageChecker'] = $dir . 
'groups/MediaWiki/Checker.php';
 
 # complex messages

Added: trunk/extensions/Translate/groups/WikiBlame/WikiBlame.yml
===================================================================
--- trunk/extensions/Translate/groups/WikiBlame/WikiBlame.yml                   
        (rev 0)
+++ trunk/extensions/Translate/groups/WikiBlame/WikiBlame.yml   2010-08-12 
20:35:12 UTC (rev 70985)
@@ -0,0 +1,26 @@
+BASIC:
+  id: out-wikiblame
+  label: WikiBlame
+  namespace: NS_WIKIMEDIA
+  class: FileBasedMessageGroup
+  description: "{{int:int:bw-desc-wikiblame}}"
+  display: out/wikiblame
+
+FILES:
+  class: FlatPhpFFS
+  sourcePattern: %GROUPROOT%/wikiblame/%CODE%.php
+  targetPattern: wikiblame/%CODE%.php
+  header: |
+    <?php
+    /** WikiBlame
+     *
+     */
+
+TAGS:
+  optional:
+    - text_dir
+    - messages\\x5b\'manual_link\'\\x5d
+    - messages\\x5b\'contact_link\'\\x5d
+    - messages\\x5b\'lang_example\'\\x5d
+    - messages\\x5b\'project_example\'\\x5d
+    - messages\\x5b\'binary_in_wp\'\\x5d


Property changes on: trunk/extensions/Translate/groups/WikiBlame/WikiBlame.yml
___________________________________________________________________
Added: svn:eol-style
   + native

Deleted: trunk/extensions/Translate/groups/Wikiblame.php
===================================================================
--- trunk/extensions/Translate/groups/Wikiblame.php     2010-08-12 20:27:54 UTC 
(rev 70984)
+++ trunk/extensions/Translate/groups/Wikiblame.php     2010-08-12 20:35:12 UTC 
(rev 70985)
@@ -1,55 +0,0 @@
-<?php
-/**
- * Support Wikiblame: http://wikipedia.ramselehof.de/wikiblame.php.
- *
- * @file
- * @ingroup 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 MessageGroupOld {
-       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(
-               'text_dir',
-               'messages\\x5b\'manual_link\'\\x5d',
-               'messages\\x5b\'contact_link\'\\x5d',
-               'messages\\x5b\'lang_example\'\\x5d',
-               'messages\\x5b\'project_example\'\\x5d',
-               'messages\\x5b\'binary_in_wp\'\\x5d',
-       );
-
-       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 );
-       }
-}



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to