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

Revision: 60965
Author:   tstarling
Date:     2010-01-12 07:27:56 +0000 (Tue, 12 Jan 2010)

Log Message:
-----------
* Finished renaming GNSM to GoogleNewsSitemap. I used "Sitemap" instead of 
"SiteMap" because that's how Google spells it. 
* Renamed feedSMItem to FeedSitemapItem. 
* Removed "Special" from the special page aliases, as in "SpecialGNSM", since 
special pages do not normally have special in their name twice (once in the 
namespace and once in the second part). That meant that all the localisations 
could be removed since they were only translating the word "Special".

Modified Paths:
--------------
    trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.alias.php
    trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.i18n.php
    trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.php
    trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap_body.php

Modified: trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.alias.php
===================================================================
--- trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.alias.php       
2010-01-12 07:24:25 UTC (rev 60964)
+++ trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.alias.php       
2010-01-12 07:27:56 UTC (rev 60965)
@@ -1,42 +1,14 @@
 <?php
 /**
- * Aliases for Special:Editcount
+ * Aliases for Special:GoogleNewsSitemap
  *
  * @addtogroup Extensions
  */
 
-/**
- * Deutsch
- * @author Amgine
- **/
-$aliases['de'] = array(
-    'GNSM' => array( 'SpezialGNSM' )
-);
-
 /** English
  * @author Amgine
  **/
 $aliases['en'] = array(
-    'GNSM' => array( 'Google News SiteMap', 'SpecialGNSM' ),
+    'GoogleNewsSitemap' => array( 'Google News Sitemap' ),
 );
 
-/** Français
- * @author Amgine
- **/
-$aliases['fr'] = array(
-    'GNSM' => array( 'GNSMSpécial' ),
-);
-
-/** Nederlands
- * @author Amgine
- **/
-$aliases['nl'] = array(
-    'GNSM' => array( 'GNSMSpeciaal' )
-);
-
-/** Norsk (bokmål)
- * @author Amgine
- **/
-$aliases['no'] = array(
-       'GNSM' => array( 'SpesialGNSM' ),
-);
\ No newline at end of file

Modified: trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.i18n.php
===================================================================
--- trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.i18n.php        
2010-01-12 07:24:25 UTC (rev 60964)
+++ trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.i18n.php        
2010-01-12 07:27:56 UTC (rev 60965)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Internationalisation file for extension special page GNSM
+ * Internationalisation file for extension special page GoogleNewsSitemap
  * New version of DynamicPageList extension for use by Wikinews projects
  *
  * @addtogroup Extensions
@@ -13,7 +13,7 @@
  **/
 
 $messages['en'] = array(
-    'gnsm'                  => 'Google News SiteMap',
+    'gnsm'                  => 'Google News Sitemap',
     'gnsm-desc'             => 'Outputs an Atom/RSS feed as a Google News 
Sitemap.',
     'gnsm_categorymap'      => '', #default empty. list of categories to map 
to keywords. do not translate.
     'gnsm_toomanycats'      => 'Error: Too many categories!',
@@ -27,7 +27,7 @@
  **/
 
 $messages['fr'] = array(
-    'gnsm'                  => 'Google nouvelles SiteMap',
+    'gnsm'                  => 'Google nouvelles Sitemap',
     'gnsm-desc'             => 'Cre un Atom ou RSS feed comme un plan Sitemap 
pour Google.',
     'gnsm_toomanycats'      => 'Erreur: Trop de nombreuses catégories!',
     'gnsm_toofewcats'       => 'Erreur: Trop peu de catégories!',

Modified: trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.php
===================================================================
--- trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.php     
2010-01-12 07:24:25 UTC (rev 60964)
+++ trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.php     
2010-01-12 07:27:56 UTC (rev 60965)
@@ -1,8 +1,8 @@
 <?php
 if (!defined('MEDIAWIKI')) {
     echo <<<EOT
-To install GNSM extension, an extension special page, put the following line 
in LocalSettings.php:
-require_once( dirname(__FILE__) . '/extensions/GNSM/SpecialGNSM.php' );
+To install GoogleNewsSitemap extension, an extension special page, put the 
following line in LocalSettings.php:
+require_once( dirname(__FILE__) . 
'/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap.php' );
 EOT;
     exit( 1 );
 }
@@ -17,11 +17,11 @@
  *                  - 0.92 http://www.rssboard.org/rss-0-9-2
  *  Atom feed output - 2005 http://tools.ietf.org/html/rfc4287
  **
- * This page can be accessed from Special:GNSM[/][|category=Catname]
+ * This page can be accessed from 
Special:GoogleNewsSitemap[/][|category=Catname]
  *      [|notcategory=OtherCatName][|namespace=0][|notnamespace=User]
  *      [|feed=sitemap][|count=10][|mode=ul][|ordermethod=lastedit]
  *      [|order=ascending] as well as being included like
- *      {{Special:GNSM/[options][...]}}
+ *      {{Special:GoogleNewsSitemap/[options][...]}}
  **
  *  This program is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the Free
@@ -45,7 +45,7 @@
  *      n:en:User:IlyaHaykinson http://en.wikinews.org/wiki/User:IlyaHaykinson
  **
  * FIXME requests
- *  use=Mediawiki:GNSM_Feedname     Parameter to allow on-site control of feed
+ *  use=Mediawiki:GoogleNewsSitemap_Feedname     Parameter to allow on-site 
control of feed
  **
  * @addtogroup Extensions
  *
@@ -55,15 +55,15 @@
  */
 $wgExtensionCredits['specialpage'][] = array(
        'path' => __FILE__,
-       'name' => 'GNSM',
+       'name' => 'GoogleNewsSitemap',
        'author' => 'Amgine',
        'description' => 'Outputs xml based on defined criteria',
        'descriptionmsg' => 'gnsm-desc',
-       'url' => 'http://www.mediawiki.org/wiki/Extension:GNSM',
+       'url' => 'http://www.mediawiki.org/wiki/Extension:GoogleNewsSitemap',
 );
 
 $dir = dirname(__FILE__) . '/';
-$wgExtensionMessagesFiles['GNSM'] = $dir . 'SpecialGNSM.i18n.php';
-$wgExtensionAliasesFiles['GNSM'] = $dir . 'SpecialGNSM.alias.php';
-$wgAutoloadClasses['GNSM'] = $dir . 'SpecialGNSM_body.php';
-$wgSpecialPages['GNSM'] = 'GNSM';
\ No newline at end of file
+$wgExtensionMessagesFiles['GoogleNewsSitemap'] = $dir . 
'SpecialGoogleNewsSitemap.i18n.php';
+$wgExtensionAliasesFiles['GoogleNewsSitemap'] = $dir . 
'SpecialGoogleNewsSitemap.alias.php';
+$wgAutoloadClasses['GoogleNewsSitemap'] = $dir . 
'SpecialGoogleNewsSitemap_body.php';
+$wgSpecialPages['GoogleNewsSitemap'] = 'GoogleNewsSitemap';

Modified: trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap_body.php
===================================================================
--- trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap_body.php        
2010-01-12 07:24:25 UTC (rev 60964)
+++ trunk/extensions/GoogleNewsSitemap/SpecialGoogleNewsSitemap_body.php        
2010-01-12 07:27:56 UTC (rev 60965)
@@ -2,11 +2,11 @@
 if (!defined('MEDIAWIKI')) die();
 
 /**
- * Class GNSM creates Atom/RSS feeds for Wikinews
+ * Class GoogleNewsSitemap creates Atom/RSS feeds for Wikinews
  **
  * Simple feed using Atom/RSS coupled to DynamicPageList category searching.
  *
- * To use: http://wiki.url/Special:GNSM/<feedType>?[paramter=value][...]
+ * To use: 
http://wiki.url/Special:GoogleNewsSitemap/<feedType>?[paramter=value][...]
  *
  * Implemented parameters are marked with an @
  **
@@ -26,7 +26,7 @@
  *     suppresserrors = bool ; default = false
  **/
 
-class GNSM extends IncludableSpecialPage {
+class GoogleNewsSitemap extends IncludableSpecialPage {
 
 
        /**
@@ -65,7 +65,7 @@
         * Constructor
         **/
        public function __construct() {
-               parent::__construct( 'GNSM' );
+               parent::__construct( 'GoogleNewsSitemap' );
        }
 
        /**
@@ -77,7 +77,7 @@
                global $wgContLang;
                global $wgRequest, $wgOut;
                global $wgSitename, $wgServer, $wgScriptPath;
-               wfLoadExtensionMessages( 'GNSM' );
+               wfLoadExtensionMessages( 'GoogleNewsSitemap' );
                global $wgFeedClasses, $wgLocaltimezone;
 
                // Not sure how clean $wgLocaltimezone is
@@ -143,7 +143,7 @@
                                                $this->pubDate = isset( 
$row->cl_timestamp ) ? $row->cl_timestamp : date( DATE_ATOM );
                                                $feedArticle = new Article( 
$title );
 
-                                               $feedItem = new feedSMItem(
+                                               $feedItem = new FeedSitemapItem(
                                                trim( $title->getFullURL() ),
                                                wfTimeStamp( TS_ISO_8601, 
$this->pubDate ),
                                                $this->getKeywords( $title ),
@@ -515,11 +515,11 @@
 }
 
 /**
- * feedSMItem Class
+ * FeedSitemapItem Class
  **
  * Base class for basic SiteMap support, for building url containers.
  **/
-class feedSMItem{
+class FeedSitemapItem{
        /**
         * Var string
         **/
@@ -610,7 +610,7 @@
 
 }
 
-class SitemapFeed extends feedSMItem{
+class SitemapFeed extends FeedSitemapItem{
        /**
         * Output feed headers
         **/
@@ -623,7 +623,7 @@
        }
        /**
         * Output a SiteMap 0.9 item
-        * @param feedSMItem item to be output
+        * @param FeedSitemapItem item to be output
         **/
        function outItem( $item ) {
                ?>



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

Reply via email to