Comment generated code to explain the i18n JSON migration.
authorAdam Roses Wight <awight@wikimedia.org>
Tue, 25 Mar 2014 20:53:06 +0000 (13:53 -0700)
committerAdam Roses Wight <awight@wikimedia.org>
Wed, 26 Mar 2014 17:32:18 +0000 (10:32 -0700)
Change-Id: I4d41be5a70eab5ceeec3be0bd544e4a87504572a

maintenance/generateJsonI18n.php

index 3b2374d..27a9ff1 100644 (file)
@@ -103,6 +103,17 @@ class GenerateJsonI18n extends Maintenance {
        protected function doShim( $jsondir ) {
                $shim = <<<'PHP'
 <?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();
 $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, &$cachedData ) {
        $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );