r85498 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85497‎ | r85498 | r85499 >
Date:00:58, 6 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added messages for Gmaps v2 params
Modified paths:
  • /trunk/extensions/Maps/Maps.i18n.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.i18n.php
@@ -158,6 +158,12 @@
159159 'maps_videos' => 'Videos',
160160 'maps_wikipedia' => 'Wikipedia',
161161 'maps_webcams' => 'Webcams',
 162+ 'maps-googlemaps2-par-type' => 'The map type to initially show.',
 163+ 'maps-googlemaps2-par-types' => 'The map types that will be available via the type control.',
 164+ 'maps-googlemaps2-par-controls' => 'The controls to place on the map.',
 165+ 'maps-googlemaps2-par-autozoom' => 'Enable scrolling using the mousewheel.',
 166+ 'maps-googlemaps2-par-kml' => 'KML files to load onto the map.',
 167+ 'maps-googlemaps2-par-overlays' => 'Overlays the user can turn on.',
162168
163169 // Google Maps v3
164170 'maps-googlemaps3-incompatbrowser' => 'Your browser is not compatible with Google Maps v3.',
@@ -179,7 +185,7 @@
180186 'maps-osm-par-thumbs' => 'Show thumbs',
181187 'maps-osm-par-photos' => 'Show photos',
182188
183 - // Yahoo! Maps_examples
 189+ // Yahoo! Maps
184190 'maps-yahoomaps-par-type' => 'The map type to initially show.',
185191 'maps-yahoomaps-par-types' => 'The map types that will be available via the type control.',
186192 'maps-yahoomaps-par-controls' => 'The controls to place on the map.',
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php
@@ -53,7 +53,8 @@
5454 $params['controls']->setDefault( $egMapsGMapControls );
5555 $params['controls']->addCriteria( new CriterionInArray( self::getControlNames() ) );
5656 $params['controls']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) );
57 -
 57+ $params['controls']->setDescription( wfMsg( 'maps-googlemaps2-par-controls' ) );
 58+
5859 $params['type'] = new Parameter(
5960 'type',
6061 Parameter::TYPE_STRING,
@@ -65,6 +66,7 @@
6667 array( 'types' )
6768 );
6869 $params['type']->addManipulations( new MapsParamGMapType() );
 70+ $params['type']->setDescription( wfMsg( 'maps-googlemaps2-par-type' ) );
6971
7072 $params['types'] = new ListParameter(
7173 'types',
@@ -76,25 +78,30 @@
7779 new CriterionInArray( array_keys( self::$mapTypes ) ),
7880 )
7981 );
80 - $params['types']->addManipulations( new MapsParamGMapType() );
 82+ $params['types']->addManipulations( new MapsParamGMapType() );
 83+ $params['types']->setDescription( wfMsg( 'maps-googlemaps2-par-types' ) );
8184
8285 $params['autozoom'] = new Parameter(
8386 'autozoom',
8487 Parameter::TYPE_BOOLEAN,
8588 $egMapsGoogleAutozoom
8689 );
 90+ $params['autozoom']->setDescription( wfMsg( 'maps-googlemaps2-par-autozoom' ) );
8791
8892 $params['kml'] = new ListParameter( 'kml' );
8993 $params['kml']->setDefault( array() );
9094 //$params['kml']->addManipulations( new MapsParamFile() );
 95+ $params['kml']->setDescription( wfMsg( 'maps-googlemaps2-par-kml' ) );
9196
9297 $params['overlays'] = new ListParameter( 'overlays' );
9398 $params['overlays']->setDefault( $egMapsGMapOverlays );
9499 $params['overlays']->addCriteria( new CriterionGoogleOverlay( self::$overlayData ) );
95100 $params['overlays']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); // TODO
 101+ $params['overlays']->setDescription( wfMsg( 'maps-googlemaps2-par-overlays' ) );
96102
97103 $params['resizable'] = new Parameter( 'resizable', Parameter::TYPE_BOOLEAN );
98104 $params['resizable']->setDefault( $egMapsResizableByDefault, false );
 105+ $params['resizable']->setDescription( wfMsg( 'maps-par-resizable' ) );
99106 }
100107
101108 /**

Status & tagging log