From bb6fc2380a19ce399b1cce262c20efa5b85027e6 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 10 Oct 2016 01:34:57 +0200 Subject: [PATCH] Moved i18n registration out of wgExtensionFunctions --- Maps.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Maps.php b/Maps.php index 536fe435d..9386d8cba 100644 --- a/Maps.php +++ b/Maps.php @@ -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; @@ -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';