From: Amir E. Aharoni Date: Mon, 29 Oct 2012 13:30:47 +0000 (+0200) Subject: Proper directionality for entry points table X-Git-Tag: 1.31.0-rc.0~21797^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=ae00ed7f9056b4178d7c948b349e772a1ea9066b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {