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
'version-entrypoints-load-php' => wfScript( 'load' ),
);
'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() ) .
$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::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 ) {
Html::closeElement( 'tr' );
foreach ( $entryPoints as $message => $value ) {