Use user interface instead of content language for RTL flipping

The CSS get automatically flipped on RTL user interface language.

Change-Id: I472c0fbbdaf20bd5cb3ad55d1194c99fc72ffdba
This commit is contained in:
Fomafix 2023-10-21 13:42:18 +00:00
parent e029f1b13a
commit 192435154e
2 changed files with 2 additions and 5 deletions

View file

@ -23,7 +23,7 @@
table {
float: left;
margin-right: 3em;
margin: 0 1em 0 0;
border-collapse: collapse;
td {

View file

@ -759,12 +759,9 @@ class SpecialReplaceText extends SpecialPage {
$numRows = count( $rows );
// Lay out namespaces in multiple floating two-column tables so they'll
// be arranged nicely while still accommodating different screen widths
// Float to the right on RTL wikis
$tableStyle = $this->contentLanguage->isRTL() ?
'float: right; margin: 0 0 0em 1em' : 'float: left; margin: 0 1em 0em 0';
// Build the final HTML table...
for ( $i = 0; $i < $numRows; $i += $rowsPerTable ) {
$tables .= Xml::openElement( 'table', [ 'style' => $tableStyle ] );
$tables .= Xml::openElement( 'table' );
for ( $j = $i; $j < $i + $rowsPerTable && $j < $numRows; $j++ ) {
$tables .= "<tr>\n" . $rows[$j] . "</tr>";
}