Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/219263
Change subject: Remove i18n shim and fix $wgMessagesDirs key bug ...................................................................... Remove i18n shim and fix $wgMessagesDirs key bug Change-Id: Ic8154de0d5c6a756897933b64a0af3c927ff7d7a --- D Newsletter.i18n.php M Newsletter.php 2 files changed, 2 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/63/219263/1 diff --git a/Newsletter.i18n.php b/Newsletter.i18n.php deleted file mode 100644 index 94616b5..0000000 --- a/Newsletter.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( 'wfJsonI18nShim5eb518311a7188ae' ) ) { - function wfJsonI18nShim5eb518311a7188ae( $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'][] = 'wfJsonI18nShim5eb518311a7188ae'; -} diff --git a/Newsletter.php b/Newsletter.php index 7cf78d8..9e78daa 100644 --- a/Newsletter.php +++ b/Newsletter.php @@ -20,11 +20,10 @@ 'author' => array( 'Siebrand Mazeland', ), 'url' => 'https://www.mediawiki.org/wiki/Extension:Newsletter', 'descriptionmsg' => 'newsletter-desc', - 'version' => '1.1.0', + 'version' => '1.2.0', ); -$wgMessagesDirs[''] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Newsletter'] = __DIR__ . '/Newsletter.i18n.php'; +$wgMessagesDirs['Newsletter'] = __DIR__ . '/i18n'; $wgAutoloadClasses['NewsletterPreferences'] = __DIR__ . '/Newsletter.hooks.php'; -- To view, visit https://gerrit.wikimedia.org/r/219263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8154de0d5c6a756897933b64a0af3c927ff7d7a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Siebrand <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
