Ebrahim has uploaded a new change for review.

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

Change subject: Apply user lang on special pages
......................................................................

Apply user lang on special pages

Fix the regression caused by Ib790498f

Bug: T98583
Change-Id: I519e71994cd32f67e5c792a780df3b4ee43176b2
---
M includes/skins/SkinTemplate.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/209980/1

diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index d7e0132..55f90e8 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -423,6 +423,10 @@
                # Add a mw-content-ltr/rtl class to be able to style based on 
text direction
                # when the content is different from the UI language
                $pageLang = $title->getPageViewLanguage();
+               if ( in_array( $title->getNamespace(), array( NS_SPECIAL, 
NS_FILE ) ) ||
+                       Action::getActionName( $this ) !== 'view' ) {
+                       $pageLang = $this->getLanguage();
+               }
                $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
                $realBodyAttribs['dir'] = $pageLang->getDir();
                $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();

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

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

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

Reply via email to