Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/272894

Change subject: Add $lang parameter to SpecialVersion::getVersion
......................................................................

Add $lang parameter to SpecialVersion::getVersion

Bug: T127233
Change-Id: Id14733aaef3e52a2e315bffe74baeb926d46e238
---
M includes/specials/SpecialVersion.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/272894/1

diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index d706786..c0f9590 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -255,9 +255,10 @@
         * Return a string of the MediaWiki version with Git revision if 
available.
         *
         * @param string $flags
+        * @param Language|string|null $lang
         * @return mixed
         */
-       public static function getVersion( $flags = '' ) {
+       public static function getVersion( $flags = '', $lang = null ) {
                global $wgVersion, $IP;
 
                $gitInfo = self::getGitHeadSha1( $IP );
@@ -268,7 +269,11 @@
                        $version = "$wgVersion ($shortSha1)";
                } else {
                        $shortSha1 = substr( $gitInfo, 0, 7 );
-                       $shortSha1 = wfMessage( 'parentheses' )->params( 
$shortSha1 )->escaped();
+                       $msg = wfMessage( 'parentheses' );
+                       if ( $lang !== null ) {
+                               $msg->inLanguage( $lang );
+                       }
+                       $shortSha1 = $msg->params( $shortSha1 )->escaped();
                        $version = "$wgVersion $shortSha1";
                }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id14733aaef3e52a2e315bffe74baeb926d46e238
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

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

Reply via email to