r66531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66530‎ | r66531 | r66532 >
Date:13:43, 16 May 2010
Author:ialex
Status:deferred
Tags:
Comment:
Fix HTML5 validation on Special:LanguageStats
Modified paths:
  • /trunk/extensions/Translate/SpecialTranslationStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialTranslationStats.php
@@ -145,13 +145,16 @@
146146 protected function eRadio( $name, FormOptions $opts, array $alts ) {
147147 $value = $opts[$name];
148148
149 - $s = '<tr><td>' . $this->eLabel( $name ) . '</td><td>';
 149+ $label = 'translate-statsf-' . $name;
 150+ $label = wfMsgExt( $label, array( 'parsemag', 'escapenoentities' ) );
 151+ $s = '<tr><td>' . $label . '</td><td>';
150152
151153 $options = array();
152154 foreach ( $alts as $alt ) {
153 - $radio = Xml::radio( $name, $alt, $alt === $opts[$name] ) . ' ';
154 - $label = wfMsgExt( "translate-statsf-$name-$alt", array( 'parsemag', 'escapenoentities' ) );
155 - $options[] = Xml::tags( 'label', null, "$radio $label" );
 155+ $id = "$name-$alt";
 156+ $radio = Xml::radio( $name, $alt, $alt === $opts[$name],
 157+ array( 'id' => $id ) ) . ' ';
 158+ $options[] = $radio . ' ' . $this->eLabel( $id );
156159 }
157160
158161 $s .= Xml::tags( 'span', array( 'id' => $name ), implode( ' ', $options ) );

Status & tagging log