Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/212327

Change subject: Remove i18n shim
......................................................................

Remove i18n shim

Change-Id: I6e89b3c13c7bfbfe268b49cbc8c2623e551ff145
---
M SpecialViewUserLang.php
D WikimediaIncubator.i18n.php
M WikimediaIncubator.php
3 files changed, 4 insertions(+), 37 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/27/212327/1

diff --git a/SpecialViewUserLang.php b/SpecialViewUserLang.php
index e2f28ea..1532f32 100644
--- a/SpecialViewUserLang.php
+++ b/SpecialViewUserLang.php
@@ -104,4 +104,8 @@
                        Xml::closeElement( 'ul' )
                );
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }
diff --git a/WikimediaIncubator.i18n.php b/WikimediaIncubator.i18n.php
deleted file mode 100644
index 2008a7f..0000000
--- a/WikimediaIncubator.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( 'wfJsonI18nShim8d7f72619a601c5c' ) ) {
-       function wfJsonI18nShim8d7f72619a601c5c( $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'][] = 
'wfJsonI18nShim8d7f72619a601c5c';
-}
diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
index e15de3d..e7ec7d1 100644
--- a/WikimediaIncubator.php
+++ b/WikimediaIncubator.php
@@ -76,14 +76,12 @@
 $wgRemoveGroups['bureaucrat'][] = 'test-sysop';
 
 $wgMessagesDirs['WikimediaIncubator'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['WikimediaIncubator'] = $dir . 
'WikimediaIncubator.i18n.php';
 $wgExtensionMessagesFiles['WikimediaIncubatorAlias'] = $dir . 
'WikimediaIncubator.alias.php';
 $wgExtensionMessagesFiles['WikimediaIncubatorMagic'] = $dir . 
'WikimediaIncubator.i18n.magic.php';
 
 /* Special:ViewUserLang */
 $wgAutoloadClasses['SpecialViewUserLang'] = $dir . 'SpecialViewUserLang.php';
 $wgSpecialPages['ViewUserLang'] = 'SpecialViewUserLang';
-$wgSpecialPageGroups['ViewUserLang'] = 'users';
 $wgAvailableRights[] = 'viewuserlang';
 $wgHooks['ContributionsToolLinks'][] = 
'WikimediaIncubator::efLoadViewUserLangLink';
 $wgGroupPermissions['*']['viewuserlang'] = false;

-- 
To view, visit https://gerrit.wikimedia.org/r/212327
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e89b3c13c7bfbfe268b49cbc8c2623e551ff145
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to