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

Revision: 55141
Author:   siebrand
Date:     2009-08-16 13:41:06 +0000 (Sun, 16 Aug 2009)

Log Message:
-----------
Add PLURAL support for description message of (Semantic)Maps

Modified Paths:
--------------
    trunk/extensions/Maps/Maps.i18n.php
    trunk/extensions/Maps/Maps.php
    trunk/extensions/SemanticMaps/SemanticMaps.i18n.php
    trunk/extensions/SemanticMaps/SemanticMaps.php

Modified: trunk/extensions/Maps/Maps.i18n.php
===================================================================
--- trunk/extensions/Maps/Maps.i18n.php 2009-08-16 13:27:10 UTC (rev 55140)
+++ trunk/extensions/Maps/Maps.i18n.php 2009-08-16 13:41:06 UTC (rev 55141)
@@ -17,7 +17,7 @@
 $messages['en'] = array(
        'maps_name' => 'Maps',
        'maps_desc' => "Provides the ability to display coordinate data in 
maps, and geocode addresses ([http://wiki.bn2vs.com/wiki/Maps demo]).
-Available mapping services: $1",
+Available mapping {{PLURAL:$2|service|services}}: $1",
 
        'maps_coordinates_missing' => 'No coordinates provided for the map.',
        'maps_geocoding_failed' => 'The following 
{{PLURAL:$2|address|addresses}} could not be geocoded: $1.

Modified: trunk/extensions/Maps/Maps.php
===================================================================
--- trunk/extensions/Maps/Maps.php      2009-08-16 13:27:10 UTC (rev 55140)
+++ trunk/extensions/Maps/Maps.php      2009-08-16 13:41:06 UTC (rev 55141)
@@ -106,6 +106,7 @@
        $egMapsDefaultGeoService = in_array($egMapsDefaultGeoService, 
$egMapsAvailableGeoServices) ? $egMapsDefaultGeoService : 
$egMapsAvailableGeoServices[0];
        
        $services_list = implode(', ', array_keys($egMapsServices));
+       $services_count = count( $egMapsServices );
 
        wfLoadExtensionMessages( 'Maps' );
        
@@ -115,8 +116,8 @@
                'version' => Maps_VERSION,
                'author' => array("[http://bn2vs.com Jeroen De Dauw]", 
"[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]", "Robert 
Buzink", "Matt Williamson", "[http://www.sergeychernyshev.com Sergey 
Chernyshev]"),
                'url' => 'http://www.mediawiki.org/wiki/Extension:Maps',
-               'description' =>  wfMsg( 'maps_desc', $services_list ),
-               'descriptionmsg' => wfMsg( 'maps_desc', $services_list ),
+               'description' =>  wfMsgExt( 'maps_desc', 'parsemag', 
$services_list, $service_count ),
+               'descriptionmsg' => wfMsgExt( 'maps_desc', 'parsemag', 
$services_list, $service_count ),
        );
 
        efMapsAddParserHooks();

Modified: trunk/extensions/SemanticMaps/SemanticMaps.i18n.php
===================================================================
--- trunk/extensions/SemanticMaps/SemanticMaps.i18n.php 2009-08-16 13:27:10 UTC 
(rev 55140)
+++ trunk/extensions/SemanticMaps/SemanticMaps.i18n.php 2009-08-16 13:41:06 UTC 
(rev 55141)
@@ -18,7 +18,7 @@
 $messages['en'] = array(
        'semanticmaps_name' => 'Semantic Maps',
        'semanticmaps_desc' => "Provides the ability to view and edit 
coordinate data stored through the Semantic MediaWiki extension 
([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]).
-Available map services: $1",
+Available map {{PLURAL:$2|service|services}}: $1",
        'semanticmaps_lookupcoordinates' => 'Look up coordinates',
        'semanticmaps_enteraddresshere' => 'Enter address here',
        'semanticmaps_notfound' => 'not found',

Modified: trunk/extensions/SemanticMaps/SemanticMaps.php
===================================================================
--- trunk/extensions/SemanticMaps/SemanticMaps.php      2009-08-16 13:27:10 UTC 
(rev 55140)
+++ trunk/extensions/SemanticMaps/SemanticMaps.php      2009-08-16 13:41:06 UTC 
(rev 55141)
@@ -57,6 +57,7 @@
        global $wgExtensionCredits, $egMapsServices;
 
        $services_list = implode(', ', array_keys($egMapsServices));
+       $services_count = count( $egMapsServices );
        
        wfLoadExtensionMessages( 'SemanticMaps' );
        
@@ -66,8 +67,8 @@
                'version' => SM_VERSION,
                'author' => array("[http://bn2vs.com Jeroen De Dauw]", "Yaron 
Koren", "Robert Buzink"),
                'url' => 
'http://www.mediawiki.org/wiki/Extension:Semantic_Maps',
-               'description' => wfMsg( 'semanticmaps_desc', $services_list ),
-               'descriptionmsg' => wfMsg( 'semanticmaps_desc', $services_list 
),
+               'description' => wfMsgExt( 'semanticmaps_desc', 'parsemag', 
$services_list, $services_count ),
+               'descriptionmsg' => wfMsgExt( 'semanticmaps_desc', 'parsemag', 
$services_list, $services_count ),
        );
 
        smfInitFormHook('map');



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

Reply via email to