r83892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83891‎ | r83892 | r83893 >
Date:13:30, 14 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix i18n weirdness causing other extensions to fail registering hooks (wtf?)
Modified paths:
  • /trunk/extensions/Maps/Maps.i18n.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.i18n.php
@@ -15,9 +15,7 @@
1616 */
1717 $messages['en'] = array(
1818 // General
19 - 'maps_name' => 'Maps',
20 - 'maps_desc' => "Provides the ability to display coordinate data in maps, and geocode addresses ([http://mapping.referata.com/wiki/Maps_examples demos]).
21 -{{PLURAL:$2|Mapping service is|Available mapping services:}} $1",
 19+ 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([http://mapping.referata.com/wiki/Examples demos])",
2220 'maps_map' => 'Map',
2321 'maps-loading-map' => 'Loading map...',
2422 'maps-markers' => 'Markers',
Index: trunk/extensions/Maps/Maps.php
@@ -38,6 +38,17 @@
3939
4040 define( 'Maps_VERSION', '0.7.6 alpha' );
4141
 42+$wgExtensionCredits['parserhook'][] = array(
 43+ 'path' => __FILE__,
 44+ 'name' => 'Maps',
 45+ 'version' => Maps_VERSION,
 46+ 'author' => array(
 47+ '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]'
 48+ ),
 49+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Maps',
 50+ 'descriptionmsg' => 'maps-desc'
 51+);
 52+
4253 // The different coordinate notations.
4354 define( 'Maps_COORDS_FLOAT', 'float' );
4455 define( 'Maps_COORDS_DMS', 'dms' );
@@ -159,7 +170,7 @@
160171 * @return true
161172 */
162173 function efMapsSetup() {
163 - global $wgExtensionCredits, $wgLang, $wgExtraNamespaces, $wgNamespaceAliases, $wgVersion;
 174+ global $wgExtraNamespaces, $wgNamespaceAliases, $wgVersion;
164175
165176 // This function has been deprecated in 1.16, but needed for earlier versions.
166177 if ( version_compare( $wgVersion, '1.16', '<' ) ) {
@@ -183,24 +194,5 @@
184195 wfRunHooks( 'MappingServiceLoad' );
185196 wfRunHooks( 'MappingFeatureLoad' );
186197
187 - // Creation of a list of internationalized service names.
188 - $services = array();
189 - foreach ( MapsMappingServices::getServiceIdentifiers() as $identifier ) $services[] = wfMsg( 'maps_' . $identifier );
190 - $servicesList = $wgLang->listToText( $services );
191 -
192 - $wgExtensionCredits['parserhook'][] = array(
193 - 'path' => __FILE__,
194 - 'name' => wfMsg( 'maps_name' ),
195 - 'version' => Maps_VERSION,
196 - 'author' => array(
197 - '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]',
198 - '[http://www.mediawiki.org/wiki/Extension:Maps/Credits ' . wfMsg( 'maps-others' ) . ']'
199 - ),
200 - 'url' => 'http://www.mediawiki.org/wiki/Extension:Maps',
201 - // Want to "fix" this? Sure, but test your code!
202 - // This breaks stuff: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Maps/Maps.php?r1=82288&r2=82503
203 - 'description' => wfMsgExt( 'maps_desc', 'parsemag', $servicesList ),
204 - );
205 -
206198 return true;
207199 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r83893match r83892jeroendedauw13:31, 14 March 2011
r83901Follow-up r83892 for Translatewikiraymond14:53, 14 March 2011

Status & tagging log