jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363975 )

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


Remove i18n shim

Change-Id: I187328ea888589aa33500dda25c73cff18261e07
---
D CodeMirror.i18n.php
M extension.json
M phpcs.xml
3 files changed, 3 insertions(+), 36 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/CodeMirror.i18n.php b/CodeMirror.i18n.php
deleted file mode 100644
index f0db7ff..0000000
--- a/CodeMirror.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( 'wfJsonI18nShimfe179a89caef8049' ) ) {
-       function wfJsonI18nShimfe179a89caef8049( $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'][] = 
'wfJsonI18nShimfe179a89caef8049';
-}
diff --git a/extension.json b/extension.json
index bff8255..a12a42a 100644
--- a/extension.json
+++ b/extension.json
@@ -9,6 +9,9 @@
        "descriptionmsg": "codemirror-desc",
        "type": "parserhook",
        "license-name": "GPL-2.0+",
+       "requires": {
+               "MediaWiki": ">= 1.23.0"
+    },
        "MessagesDirs": {
                "CodeMirror": [
                        "i18n"
diff --git a/phpcs.xml b/phpcs.xml
index 29fb515..df8c2b5 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic"/>
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment"/>
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag"/>
                <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch"/>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I187328ea888589aa33500dda25c73cff18261e07
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: Niharika29 <nko...@wikimedia.org>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to