[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserGroups[master]: Remove i18n php shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/386694 ) Change subject: Remove i18n php shim .. Remove i18n php shim The i18n php shim was added to support version 1.22 and older. Bug: T168353 Change-Id: I35b954c04e93aa90d826d238a7ec04d0fa904a18 --- D GlobalUserGroups.i18n.groups.php D GlobalUserGroups.i18n.php M GlobalUserGroups.php 3 files changed, 0 insertions(+), 73 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/GlobalUserGroups.i18n.groups.php b/GlobalUserGroups.i18n.groups.php deleted file mode 100644 index d968f8c..000 --- a/GlobalUserGroups.i18n.groups.php +++ /dev/null @@ -1,35 +0,0 @@ -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( 'wfJsonI18nShim11e072ee594c458a' ) ) { - function wfJsonI18nShim11e072ee594c458a( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/groups/$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'][] = 'wfJsonI18nShim11e072ee594c458a'; -} diff --git a/GlobalUserGroups.i18n.php b/GlobalUserGroups.i18n.php deleted file mode 100644 index eb14de9..000 --- a/GlobalUserGroups.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -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( 'wfJsonI18nShima95e29dcdd536c36' ) ) { - function wfJsonI18nShima95e29dcdd536c36( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/core/$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'][] = 'wfJsonI18nShima95e29dcdd536c36'; -} diff --git a/GlobalUserGroups.php b/GlobalUserGroups.php index 59b5c7a..e774fe1 100644 --- a/GlobalUserGroups.php +++ b/GlobalUserGroups.php @@ -33,8 +33,6 @@ // Translations $wgMessagesDirs['GlobalUserGroups'] = __DIR__ . '/i18n/core'; $wgMessagesDirs['GlobalUserGroups.groups'] = __DIR__ . '/i18n/groups'; -$wgExtensionMessagesFiles['GlobalUserGroups'] = __DIR__ . '/GlobalUserGroups.i18n.php'; -$wgExtensionMessagesFiles['GlobalUserGroups.groups'] = __DIR__ . '/GlobalUserGroups.i18n.groups.php'; // Hooks $wgHooks['UserRights'][] = 'efManageGlobalUserGroups'; @@ -95,6 +93,5 @@
[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserGroups[master]: Remove i18n php shim
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386694 ) Change subject: Remove i18n php shim .. Remove i18n php shim The i18n php shim was added to support version 1.22 and older. Bug: T168353 Change-Id: I35b954c04e93aa90d826d238a7ec04d0fa904a18 --- D GlobalUserGroups.i18n.groups.php D GlobalUserGroups.i18n.php M GlobalUserGroups.php 3 files changed, 0 insertions(+), 73 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserGroups refs/changes/94/386694/1 diff --git a/GlobalUserGroups.i18n.groups.php b/GlobalUserGroups.i18n.groups.php deleted file mode 100644 index d968f8c..000 --- a/GlobalUserGroups.i18n.groups.php +++ /dev/null @@ -1,35 +0,0 @@ -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( 'wfJsonI18nShim11e072ee594c458a' ) ) { - function wfJsonI18nShim11e072ee594c458a( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/groups/$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'][] = 'wfJsonI18nShim11e072ee594c458a'; -} diff --git a/GlobalUserGroups.i18n.php b/GlobalUserGroups.i18n.php deleted file mode 100644 index eb14de9..000 --- a/GlobalUserGroups.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -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( 'wfJsonI18nShima95e29dcdd536c36' ) ) { - function wfJsonI18nShima95e29dcdd536c36( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/core/$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'][] = 'wfJsonI18nShima95e29dcdd536c36'; -} diff --git a/GlobalUserGroups.php b/GlobalUserGroups.php index 59b5c7a..e774fe1 100644 --- a/GlobalUserGroups.php +++ b/GlobalUserGroups.php @@ -33,8 +33,6 @@ // Translations $wgMessagesDirs['GlobalUserGroups'] = __DIR__ . '/i18n/core'; $wgMessagesDirs['GlobalUserGroups.groups'] = __DIR__ . '/i18n/groups'; -$wgExtensionMessagesFiles['GlobalUserGroups'] = __DIR__ . '/GlobalUserGroups.i18n.php'; -$wgExtensionMessagesFiles['GlobalUserGroups.groups'] = __DIR__ . '/GlobalUserGroups.i18n.groups.php'; // Hooks $wgHooks['UserRights'][] = 'efManageGlobalUserGroups';