From ae00ed7f9056b4178d7c948b349e772a1ea9066b Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Mon, 29 Oct 2012 15:30:47 +0200 Subject: [PATCH] Proper directionality for entry points table The entry points table inherited the interface language's dir and lang values. This caused weird display in RTL languages and possible problems with webfonts, which work with the lang attribute. This commit sets explicit lang="en" dir="ltr" for the whole entry points table and explicit lang and dir of the current interface language for the table headings. Change-Id: I396ec98b4ea14d06bf91002b6bc4a293c09fdb33 --- includes/specials/SpecialVersion.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 87ea943b9c..e0c6d12e90 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -775,11 +775,23 @@ class SpecialVersion extends SpecialPage { 'version-entrypoints-load-php' => wfScript( 'load' ), ); + $language = $this->getLanguage(); + $thAttribures = array( + 'dir' => $language->getDir(), + 'lang' => $language->getCode() + ); $out = Html::element( 'h2', array( 'id' => 'mw-version-entrypoints' ), $this->msg( 'version-entrypoints' )->text() ) . - Html::openElement( 'table', array( 'class' => 'wikitable plainlinks', 'id' => 'mw-version-entrypoints-table' ) ) . + Html::openElement( 'table', + array( + 'class' => 'wikitable plainlinks', + 'id' => 'mw-version-entrypoints-table', + 'dir' => 'ltr', + 'lang' => 'en' + ) + ) . Html::openElement( 'tr' ) . - Html::element( 'th', array(), $this->msg( 'version-entrypoints-header-entrypoint' )->text() ) . - Html::element( 'th', array(), $this->msg( 'version-entrypoints-header-url' )->text() ) . + Html::element( 'th', $thAttribures, $this->msg( 'version-entrypoints-header-entrypoint' )->text() ) . + Html::element( 'th', $thAttribures, $this->msg( 'version-entrypoints-header-url' )->text() ) . Html::closeElement( 'tr' ); foreach ( $entryPoints as $message => $value ) { -- 2.20.1