From 7e283d72488a318c57ba4ac64b43ed2198595dec Mon Sep 17 00:00:00 2001 From: Ebrahim Date: Sun, 2 Aug 2015 23:08:37 +0000 Subject: [PATCH] i18n: Make noarticletext direction aware Currently https://fa.wikipedia.org/wiki/MediaWiki:TEST.js?uselang=fa is displaying "noarticletext" in LTR which is wrong. Bug: T60685 Change-Id: I4dc76dc1c5134c0dbe0988d6d0a3286a0e52242f --- includes/page/Article.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/page/Article.php b/includes/page/Article.php index e58ffc8514..54db19ce0a 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1270,7 +1270,13 @@ class Article implements Page { $text = wfMessage( 'noarticletext-nopermission' )->plain(); } - $outputPage->addWikiText( "
\n$text\n
" ); + $dir = $this->getContext()->getLanguage()->getDir(); + $lang = $this->getContext()->getLanguage()->getCode(); + $outputPage->addWikiText( Xml::openElement( 'div', array( + 'class' => "noarticletext mw-content-$dir", + 'dir' => $dir, + 'lang' => $lang, + ) ) . "\n$text\n" ); } } -- 2.20.1