jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370615 )
Change subject: Do some maintenance ...................................................................... Do some maintenance * Remove I18n php shim * Provide license label * Switch to consistently use __DIR__ * Update INSTALL * Bump version Note: This is breaking for MW 1.22.x and lower. Bug:T123943 Bug:T168353 Change-Id: I26f5051a8a0e04b0e25900f96624495c9d6f8f76 --- M INSTALL D SemanticGenealogy.i18n.php M SemanticGenealogy.php 3 files changed, 22 insertions(+), 59 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/INSTALL b/INSTALL index 459c84a..8dfae4e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,11 +1,9 @@ - == Requirements == Semantic Genealogy requires: -* MediaWiki 1.19 or above -* Semantic MediaWiki 1.17 or above -* PHP 5.3 or above - +* MediaWiki 1.23 or above +* Semantic MediaWiki 1.7 or above +* PHP 5.4 or above == Installation == @@ -17,4 +15,4 @@ settings (somewhere after the inclusion of Semantic MediaWiki): // Semantic Genealogy -require_once( "$IP/extensions/SemanticGenealogy/SemanticGenealogy.php" ); +require_once "$IP/extensions/SemanticGenealogy/SemanticGenealogy.php"; diff --git a/SemanticGenealogy.i18n.php b/SemanticGenealogy.i18n.php deleted file mode 100644 index fc01394..0000000 --- a/SemanticGenealogy.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * This is a backwards-compatibility shim, generated by: - * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShimc57238e8287ad032' ) ) { - function wfJsonI18nShimc57238e8287ad032( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimc57238e8287ad032'; -} diff --git a/SemanticGenealogy.php b/SemanticGenealogy.php index 91d1829..71d0e7e 100644 --- a/SemanticGenealogy.php +++ b/SemanticGenealogy.php @@ -2,7 +2,7 @@ /** * Initialization file for the Semantic Genealogy extension. * - * On MediaWiki.org: http://www.mediawiki.org/wiki/Extension:Semantic_Genealogy + * On MediaWiki.org: https://www.mediawiki.org/wiki/Extension:Semantic_Genealogy * * @file SemanticGenealogy.php * @ingroup SemanticGenealogy @@ -23,8 +23,8 @@ die( 'Not an entry point.' ); } -if ( version_compare( $wgVersion, '1.19', '<' ) ) { - die( '<b>Error:</b> This version of Semantic Genealogy requires MediaWiki 1.19 or above.' ); +if ( version_compare( $wgVersion, '1.23', '<' ) ) { + die( '<b>Error:</b> This version of Semantic Genealogy requires MediaWiki 1.23 or above.' ); } // Show a warning if Semantic MediaWiki is not loaded. @@ -37,7 +37,7 @@ } if ( !defined('SG_VERSION') ) { - define( 'SG_VERSION', '0.2.0-alpha' ); + define( 'SG_VERSION', '0.3.0-alpha' ); } $wgExtensionCredits['semantic'][] = array( @@ -45,10 +45,11 @@ 'name' => 'Semantic Genealogy', 'version' => SG_VERSION, 'author' => array( - '[http://www.mediawiki.org/wiki/User:Tpt Tpt]' + '[https://www.mediawiki.org/wiki/User:Tpt Tpt]' ), 'url' => 'https://www.mediawiki.org/wiki/Extension:Semantic_Genealogy', - 'descriptionmsg' => 'semanticgenealogy-desc' + 'descriptionmsg' => 'semanticgenealogy-desc', + 'license-name' => 'GPL-2.0+' ); $wgGenealogicalProperties = array( @@ -64,33 +65,32 @@ 'mother' => 'Mère' ); -$dir = dirname( __FILE__ ) . '/'; - $wgMessagesDirs['SemanticGenealogy'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['SemanticGenealogy'] = $dir . 'SemanticGenealogy.i18n.php'; -$wgExtensionMessagesFiles['SemanticGenealogyAlias'] = $dir . 'SemanticGenealogy.alias.php'; +$wgExtensionMessagesFiles['SemanticGenealogyAlias'] = __DIR__ . '/SemanticGenealogy.alias.php'; -$wgAutoloadClasses['SemanticGenealogy'] = $dir . 'SemanticGenealogy.body.php'; -$wgAutoloadClasses['PersonPageValues'] = $dir . 'PersonPageValues.php'; +$wgAutoloadClasses['SemanticGenealogy'] = __DIR__ . '/SemanticGenealogy.body.php'; +$wgAutoloadClasses['PersonPageValues'] = __DIR__ . '/PersonPageValues.php'; -$wgAutoloadClasses['GenealogicalFilePrinter'] = $dir . 'GenealogicalFilePrinter.php'; -$wgAutoloadClasses['Gedcom5FilePrinter'] = $dir . 'GenealogicalFilePrinter.php'; -$wgAutoloadClasses['Gedcom5ResultPrinter'] = $dir . 'Gedcom5ResultPrinter.php'; +$wgAutoloadClasses['GenealogicalFilePrinter'] = __DIR__ . '/GenealogicalFilePrinter.php'; +$wgAutoloadClasses['Gedcom5FilePrinter'] = __DIR__ . '/GenealogicalFilePrinter.php'; +$wgAutoloadClasses['Gedcom5ResultPrinter'] = __DIR__ . '/Gedcom5ResultPrinter.php'; $smwgResultFormats['gedcom'] = 'Gedcom5ResultPrinter'; $smwgResultFormats['gedcom5'] = 'Gedcom5ResultPrinter'; -$wgAutoloadClasses['SpecialFamilyTree'] = $dir . 'SpecialFamilyTree.php'; +$wgAutoloadClasses['SpecialFamilyTree'] = __DIR__ . '/SpecialFamilyTree.php'; $wgSpecialPages['FamilyTree'] = 'SpecialFamilyTree'; $moduleTemplate = array( - 'localBasePath' => $dir, + 'localBasePath' => __DIR__, 'remoteBasePath' => ( $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions' : $wgExtensionAssetsPath ) . '/SemanticGenealogy', 'group' => 'ext.smg' ); $wgResourceModules['ext.smg.specialfamilytree'] = $moduleTemplate + array( 'scripts' => 'specialFamilyTree.js', - 'dependencies' => array( 'jquery.ui.autocomplete' ), + 'dependencies' => array( + 'jquery.ui.autocomplete' + ), 'messages' => array( ) ); -- To view, visit https://gerrit.wikimedia.org/r/370615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26f5051a8a0e04b0e25900f96624495c9d6f8f76 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/SemanticGenealogy Gerrit-Branch: master Gerrit-Owner: Kghbln <mediaw...@kghoffmeyer.de> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Wilkins <thiba...@taillandier.name> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits