Load installer i18n when running update.php
authorReedy <reedy@wikimedia.org>
Thu, 11 Oct 2018 18:20:30 +0000 (19:20 +0100)
committerJforrester <jforrester@wikimedia.org>
Thu, 11 Oct 2018 20:55:24 +0000 (20:55 +0000)
Bug: T206765
Change-Id: Ie1c1a5dbf7c905eaca55777448e5aba00267ed31
(cherry-picked from a8408122fd7982ec1f6f380288c887298ba07045)

RELEASE-NOTES-1.31
maintenance/update.php

index e4d8123..f310bec 100644 (file)
@@ -7,6 +7,7 @@ THIS IS NOT A RELEASE YET
   titles when asked for none
 * (T205967) Fix syntax error typo in postgres database upgrade file.
 * (T200254) Add pear/Net_SMTP 1.7.3 to composer dependencies.
+* (T206765) Load installer i18n when running update.php.
 
 == MediaWiki 1.31.1 ==
 
index c780b6a..2a1feb4 100755 (executable)
@@ -85,7 +85,7 @@ class UpdateMediaWiki extends Maintenance {
        }
 
        function execute() {
-               global $wgVersion, $wgLang, $wgAllowSchemaUpdates;
+               global $wgVersion, $wgLang, $wgAllowSchemaUpdates, $wgMessagesDirs;
 
                if ( !$wgAllowSchemaUpdates
                        && !( $this->hasOption( 'force' )
@@ -111,6 +111,9 @@ class UpdateMediaWiki extends Maintenance {
                        }
                }
 
+               // T206765: We need to load the installer i18n files as some of errors come installer/updater code
+               $wgMessagesDirs['MediawikiInstaller'] = dirname( __DIR__ ) . '/includes/installer/i18n';
+
                $lang = Language::factory( 'en' );
                // Set global language to ensure localised errors are in English (T22633)
                RequestContext::getMain()->setLanguage( $lang );