[MediaWiki-commits] [Gerrit] mediawiki...GWToolset[master]: Remove i18n shim

2017-07-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363539 )

Change subject: Remove i18n shim
..


Remove i18n shim

Change-Id: I97117143bdd65cb04795b2276694f941ef5bee87
---
D GWToolset.i18n.php
M GWToolset.php
2 files changed, 0 insertions(+), 36 deletions(-)

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



diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php
deleted file mode 100644
index 3a20365..000
--- a/GWToolset.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 = [];
-if ( !function_exists( 'wfJsonI18nShimee273fa76ab14105' ) ) {
-   function wfJsonI18nShimee273fa76ab14105( $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'][] = 
'wfJsonI18nShimee273fa76ab14105';
-}
diff --git a/GWToolset.php b/GWToolset.php
index ab443c6..44d4a0d 100644
--- a/GWToolset.php
+++ b/GWToolset.php
@@ -84,7 +84,6 @@
 // add internationalization message file references
 $wgExtensionMessagesFiles['GWToolsetAlias'] = __DIR__ . '/GWToolset.alias.php';
 $wgMessagesDirs['GWToolset'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['GWToolset'] = __DIR__ . '/GWToolset.i18n.php';
 $wgExtensionMessagesFiles['GWToolsetNamespaces'] = __DIR__ . 
'/GWToolset.namespaces.php';
 
 // setup special page references

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97117143bdd65cb04795b2276694f941ef5bee87
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GWToolset[master]: Remove i18n shim

2017-07-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363539 )

Change subject: Remove i18n shim
..

Remove i18n shim

Change-Id: I97117143bdd65cb04795b2276694f941ef5bee87
---
D GWToolset.i18n.php
M GWToolset.php
2 files changed, 0 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/39/363539/1

diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php
deleted file mode 100644
index 3a20365..000
--- a/GWToolset.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 = [];
-if ( !function_exists( 'wfJsonI18nShimee273fa76ab14105' ) ) {
-   function wfJsonI18nShimee273fa76ab14105( $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'][] = 
'wfJsonI18nShimee273fa76ab14105';
-}
diff --git a/GWToolset.php b/GWToolset.php
index ab443c6..44d4a0d 100644
--- a/GWToolset.php
+++ b/GWToolset.php
@@ -84,7 +84,6 @@
 // add internationalization message file references
 $wgExtensionMessagesFiles['GWToolsetAlias'] = __DIR__ . '/GWToolset.alias.php';
 $wgMessagesDirs['GWToolset'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['GWToolset'] = __DIR__ . '/GWToolset.i18n.php';
 $wgExtensionMessagesFiles['GWToolsetNamespaces'] = __DIR__ . 
'/GWToolset.namespaces.php';
 
 // setup special page references

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97117143bdd65cb04795b2276694f941ef5bee87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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