jenkins-bot has submitted this change and it was merged.

Change subject: Remove pre-MW1.23 i18n file compatibility
......................................................................


Remove pre-MW1.23 i18n file compatibility

Given this extension is bundled in core, this makes no sense.

Change-Id: Ice6e7c3e96fa389292a35a5cfa5508775a089cff
---
D CiteThisPage.i18n.php
M CiteThisPage.php
2 files changed, 2 insertions(+), 38 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CiteThisPage.i18n.php b/CiteThisPage.i18n.php
deleted file mode 100644
index 8250178..0000000
--- a/CiteThisPage.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( 'wfJsonI18nShim0d54240ba430f97f' ) ) {
-       function wfJsonI18nShim0d54240ba430f97f( $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'][] = 
'wfJsonI18nShim0d54240ba430f97f';
-}
diff --git a/CiteThisPage.php b/CiteThisPage.php
index f725c2c..4a3d67a 100644
--- a/CiteThisPage.php
+++ b/CiteThisPage.php
@@ -22,9 +22,8 @@
        'url' => 'https://www.mediawiki.org/wiki/Extension:CiteThisPage'
 );
 
-# Internationalisation file
+# Internationalisation files
 $wgMessagesDirs['CiteThisPage'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CiteThisPage'] = __DIR__ . '/CiteThisPage.i18n.php';
 $wgExtensionMessagesFiles['CiteThisPageAliases'] = __DIR__ . 
'/CiteThisPage.alias.php';
 
 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 
'efCiteThisPageNav';
@@ -52,7 +51,7 @@
  */
 function efCiteThisPageNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
        // check whether we’re in the right namespace, the $revid has the 
correct type and is not empty
-       // (what would mean that the current page doesn’t exist)
+       // (which would mean that the current page doesn’t exist)
        $title = $skintemplate->getTitle();
        if ( $title->isContentPage() && $revid !== 0 && !empty( $revid ) )
                $nav_urls['citeThisPage'] = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice6e7c3e96fa389292a35a5cfa5508775a089cff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CiteThisPage
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to