Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/105505
Change subject: Prepare for composer ...................................................................... Prepare for composer Bug: 49129 Change-Id: Ie59681585ae699d16ffd7622ed01403ea3e634bc --- M Babel.php A composer.json 2 files changed, 45 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Babel refs/changes/05/105505/1 diff --git a/Babel.php b/Babel.php index 8a65b59..5b94e17 100644 --- a/Babel.php +++ b/Babel.php @@ -19,29 +19,29 @@ die( 'Invalid entry point.' ); } -$wgExtensionCredits['parserhook'][] = array( +$GLOBALS['wgExtensionCredits']['parserhook'][] = array( 'path' => __FILE__, 'name' => 'Babel', - 'version' => '1.8.1', + 'version' => '1.8.2', 'author' => 'Robert Leverington', 'url' => 'https://www.mediawiki.org/wiki/Extension:Babel', 'descriptionmsg' => 'babel-desc', ); -$wgHooks['ParserFirstCallInit'][] = 'BabelStatic::onParserFirstCallInit'; -$wgHooks['AbortNewAccount'][] = 'BabelAutoCreate::onAbortNewAccount'; +$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'BabelStatic::onParserFirstCallInit'; +$GLOBALS['wgHooks']['AbortNewAccount'][] = 'BabelAutoCreate::onAbortNewAccount'; $dir = __DIR__ . '/'; -$wgExtensionMessagesFiles['Babel'] = $dir . 'Babel.i18n.php'; -$wgExtensionMessagesFiles['BabelMagic'] = $dir . 'Babel.i18n.magic.php'; +$GLOBALS['wgExtensionMessagesFiles']['Babel'] = $dir . 'Babel.i18n.php'; +$GLOBALS['wgExtensionMessagesFiles']['BabelMagic'] = $dir . 'Babel.i18n.magic.php'; -$wgAutoloadClasses['Babel'] = $dir . 'Babel.class.php'; -$wgAutoloadClasses['BabelLanguageCodes'] = $dir . 'BabelLanguageCodes.class.php'; -$wgAutoloadClasses['BabelStatic'] = $dir . 'BabelStatic.class.php'; -$wgAutoloadClasses['BabelAutoCreate'] = $dir . 'BabelAutoCreate.class.php'; +$GLOBALS['wgAutoloadClasses']['Babel'] = $dir . 'Babel.class.php'; +$GLOBALS['wgAutoloadClasses']['BabelLanguageCodes'] = $dir . 'BabelLanguageCodes.class.php'; +$GLOBALS['wgAutoloadClasses']['BabelStatic'] = $dir . 'BabelStatic.class.php'; +$GLOBALS['wgAutoloadClasses']['BabelAutoCreate'] = $dir . 'BabelAutoCreate.class.php'; -$wgResourceModules['ext.babel'] = array( +$GLOBALS['wgResourceModules']['ext.babel'] = array( 'styles' => 'resources/ext.babel.css', 'localBasePath' => __DIR__, 'remoteExtPath' => 'Babel', @@ -49,12 +49,12 @@ // Configuration setttings. // Language names and codes constant database files, the defaults should suffice. -$wgBabelLanguageCodesCdb = $dir . 'codes.cdb'; -$wgBabelLanguageNamesCdb = $dir . 'names.cdb'; +$GLOBALS['wgBabelLanguageCodesCdb'] = $dir . 'codes.cdb'; +$GLOBALS['wgBabelLanguageNamesCdb'] = $dir . 'names.cdb'; // Array of possible levels, and their category name - variables: %code% %wikiname% %nativename% // Set to false to disable categories for a particular level. // Alphabetical levels should be in upper case. -$wgBabelCategoryNames = array( +$GLOBALS['wgBabelCategoryNames'] = array( '0' => '%code%-0', '1' => '%code%-1', '2' => '%code%-2', @@ -65,15 +65,15 @@ ); // Category name for the main (non-level) category of each language. // Set to false to disable main category. -$wgBabelMainCategory = '%code%'; +$GLOBALS['wgBabelMainCategory'] = '%code%'; // Default level. -$wgBabelDefaultLevel = 'N'; +$GLOBALS['wgBabelDefaultLevel'] = 'N'; // Use the viewing user's language for babel box header's and footer's // May fragment parser cache, but otherwise shouldn't cause problems -$wgBabelUseUserLanguage = false; +$GLOBALS['wgBabelUseUserLanguage'] = false; // A boolean (true or false) indicating whether ISO 639-3 codes should be // preferred over ISO 639-1 codes. -$wgBabelPreferISO639_3 = false; // Not yet used. +$GLOBALS['wgBabelPreferISO639_3'] = false; // Not yet used. /* Other settings, to be made in-wiki: MediaWiki:Babel-template diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..1bfbc36 --- /dev/null +++ b/composer.json @@ -0,0 +1,27 @@ +{ + "name": "mediawiki/babel", + "type": "mediawiki-extension", + "description": "Users can easily indicate their language proficiency on their user page", + "keywords": [ + "MediaWiki", + "Language" + ], + "homepage": "https://www.mediawiki.org/wiki/Extension:Babel", + "license": "GPL-2.0+", + "authors": [ + { + "name": "Robert Leverington", + "role": "Original developer" + } + ], + "support": { + "issues": "https://bugzilla.wikimedia.org/", + "irc": "irc://irc.freenode.net/mediawiki-i18n", + }, + "require": { + "composer/installers": ">=1.0.1" + }, + "autoload": { + "files": ["Babel.php"] + } +} -- To view, visit https://gerrit.wikimedia.org/r/105505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie59681585ae699d16ffd7622ed01403ea3e634bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Babel Gerrit-Branch: master Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits