From fe71840c56bf1d753b1ee7802eb8e235afe2ad39 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Fri, 4 Oct 2024 22:02:11 +0330 Subject: [PATCH] Replace use of getDirMark with HTML markup Bug: T375975 Depends-On: I2ee6d8fb9161a5434eacad819c6d7784aee8aac3 Change-Id: Ia1ab65222c486ea89e6b916fd1d5a6860439205e --- includes/CategoryTree.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/CategoryTree.php b/includes/CategoryTree.php index 5aeaff9f..b6cedec9 100644 --- a/includes/CategoryTree.php +++ b/includes/CategoryTree.php @@ -340,7 +340,9 @@ class CategoryTree { $label = $title->getPrefixedText(); } - $link = $this->linkRenderer->makeLink( $title, $label ); + $contLang = MediaWikiServices::getInstance()->getContentLanguage(); + $link = Html::rawElement( 'bdi', [ 'dir' => $contLang->getDir() ], + $this->linkRenderer->makeLink( $title, $label ) ); $count = false; $s = ''; @@ -450,8 +452,6 @@ class CategoryTree { # numbers and commas get messed up in a mixed dir env 'dir' => $context->getLanguage()->getDir() ]; - $contLang = MediaWikiServices::getInstance()->getContentLanguage(); - $s = $contLang->getDirMark() . ' '; # Create a list of category members with only non-zero member counts $memberNums = []; @@ -472,7 +472,7 @@ class CategoryTree { # Only $5 is actually used in the default message. # Other arguments can be used in a customized message. - $s .= Html::rawElement( + $s = ' ' . Html::rawElement( 'span', $attr, $context->msg( 'categorytree-member-num' )