Skip to content

Commit

Permalink
Moved i18n registration out of wgExtensionFunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDeDauw committed Oct 9, 2016
1 parent 9692ac0 commit bb6fc23
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
include_once( __DIR__ . '/vendor/autoload.php' );
}

// Internationalization
$GLOBALS['wgMessagesDirs']['Maps'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['MapsMagic'] = __DIR__ . '/Maps.i18n.magic.php';
$GLOBALS['wgExtensionMessagesFiles']['MapsAlias'] = __DIR__ . '/Maps.i18n.alias.php';


$GLOBALS['wgExtensionFunctions'][] = function () {
if ( $GLOBALS['egMapsDisableExtension'] ) {
return true;
Expand Down Expand Up @@ -90,11 +96,6 @@

$GLOBALS['egMapsStyleVersion'] = $GLOBALS['wgStyleVersion'] . '-' . Maps_VERSION;

// Internationalization
$GLOBALS['wgMessagesDirs']['Maps'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['MapsMagic'] = __DIR__ . '/Maps.i18n.magic.php';
$GLOBALS['wgExtensionMessagesFiles']['MapsAlias'] = __DIR__ . '/Maps.i18n.alias.php';

$GLOBALS['wgResourceModules'] = array_merge( $GLOBALS['wgResourceModules'], include 'Maps.resources.php' );

$GLOBALS['wgAPIModules']['geocode'] = 'Maps\Api\Geocode';
Expand Down

0 comments on commit bb6fc23

Please sign in to comment.