Merge maintenance-work branch (now with less errors!):
[lhc/web/wiklou.git] / maintenance / language / alltrans.php
index 67c870e..21103eb 100644 (file)
@@ -6,11 +6,21 @@
  * Get all the translations messages, as defined in the English language file.
  */
 
-require_once( dirname(__FILE__).'/../commandLine.inc' );
+require_once( dirname(__FILE__) . '/../Maintenance.php' );
 
-$wgEnglishMessages = array_keys( Language::getMessagesFor( 'en' ) );
-foreach( $wgEnglishMessages as $key ) {
-       echo "$key\n";
-}
+class AllTrans extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Get all messages as defined by the English language file";
+       }
 
+       public function execute() {
+               $wgEnglishMessages = array_keys( Language::getMessagesFor( 'en' ) );
+               foreach( $wgEnglishMessages as $key ) {
+                       $this->output( "$key\n" );
+               }
+       }
+}
 
+$maintClass = "AllTrans";
+require_once( DO_MAINTENANCE );