jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/360306 )
Change subject: Remove i18n shim ...................................................................... Remove i18n shim The support for MediaWiki version 1.22 and older is not necessary anymore. Change-Id: Id71843298a2e77b5e2fbad42850665240df6097e --- D TocTree.i18n.php M TocTree.php M extension.json 3 files changed, 0 insertions(+), 39 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/TocTree.i18n.php b/TocTree.i18n.php deleted file mode 100644 index 77722fb..0000000 --- a/TocTree.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 = []; -if ( !function_exists( 'wfJsonI18nShimbe1c9ea43bd38a62' ) ) { - function wfJsonI18nShimbe1c9ea43bd38a62( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( [ $code ], $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = __DIR__ . "/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'][] = 'wfJsonI18nShimbe1c9ea43bd38a62'; -} diff --git a/TocTree.php b/TocTree.php index e39db30..7d71d55 100644 --- a/TocTree.php +++ b/TocTree.php @@ -16,7 +16,6 @@ // extension i18n $wgMessagesDirs['TocTree'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['TocTree'] = __DIR__ . '/TocTree.i18n.php'; // autoloader $wgAutoloadClasses['TocTreeHooks'] = __DIR__ . '/TocTree.hooks.php'; diff --git a/extension.json b/extension.json index 4ded842..7cd293f 100644 --- a/extension.json +++ b/extension.json @@ -17,9 +17,6 @@ "i18n" ] }, - "ExtensionMessagesFiles": { - "TocTree": "TocTree.i18n.php" - }, "AutoloadClasses": { "TocTreeHooks": "TocTree.hooks.php" }, -- To view, visit https://gerrit.wikimedia.org/r/360306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id71843298a2e77b5e2fbad42850665240df6097e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TocTree Gerrit-Branch: master Gerrit-Owner: Fomafix <[email protected]> Gerrit-Reviewer: Legoktm <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
