r45448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45447‎ | r45448 | r45449 >
Date:15:49, 6 January 2009
Author:huji
Status:reverted (Comments)
Tags:
Comment:
Enabling support for RTL langauges in Special:Version tables
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)
  • /trunk/phase3/skins/monobook/rtl.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/rtl.css
@@ -160,8 +160,8 @@
161161 margin-right: 13.6em;
162162 border-left: 0;
163163 border-right: 1px solid #fabd23;
164 -}
165 -* html #column-content {
 164+}
 165+* html #column-content {
166166 float: none;
167167 margin-left: 0;
168168 margin-right: 0;
@@ -231,3 +231,10 @@
232232 html > body div#bodyContent ul#filetoc {
233233 display: block;
234234 }
 235+
 236+#sv-ext, #sv-hooks {
 237+direction:rtl;
 238+}
 239+.sv-ext-authors {
 240+direction:ltr;
 241+}
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -13,7 +13,7 @@
1414 private $firstExtOpened = true;
1515
1616 function __construct(){
17 - parent::__construct( 'Version' );
 17+ parent::__construct( 'Version' );
1818 }
1919
2020 /**
@@ -27,7 +27,7 @@
2828 $this->outputHeader();
2929
3030 $wgOut->addHTML( '<div dir="ltr">' );
31 - $text =
 31+ $text =
3232 $this->MediaWikiCredits() .
3333 $this->softwareInformation() .
3434 $this->extensionCredits();
@@ -114,7 +114,7 @@
115115 wfProfileOut( __METHOD__ );
116116 return $version;
117117 }
118 -
 118+
119119 /**
120120 * Return a string of the MediaWiki version with a link to SVN revision if
121121 * available
@@ -162,8 +162,8 @@
163163 if ( isset( $extension['version'] ) ) {
164164 $version = $extension['version'];
165165 }
166 - if ( isset( $extension['svn-revision'] ) &&
167 - preg_match( '/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
 166+ if ( isset( $extension['svn-revision'] ) &&
 167+ preg_match( '/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
168168 $extension['svn-revision'], $m ) ) {
169169 $subVersion = 'r' . $m[1];
170170 }
@@ -188,24 +188,24 @@
189189
190190 if ( count( $wgExtensionFunctions ) ) {
191191 $out .= $this->openExtType( wfMsg( 'version-extension-functions' ) );
192 - $out .= '<tr><td colspan="3">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
 192+ $out .= '<tr><td colspan="3" style="direction:ltr">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
193193 }
194194
195195 if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
196196 for ( $i = 0; $i < $cnt; ++$i )
197197 $tags[$i] = "&lt;{$tags[$i]}&gt;";
198198 $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) );
199 - $out .= '<tr><td colspan="3">' . $this->listToText( $tags ). "</td></tr>\n";
 199+ $out .= '<tr><td colspan="3" style="direction:ltr">' . $this->listToText( $tags ). "</td></tr>\n";
200200 }
201201
202202 if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
203203 $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ) );
204 - $out .= '<tr><td colspan="3">' . $this->listToText( $fhooks ) . "</td></tr>\n";
 204+ $out .= '<tr><td colspan="3" style="direction:ltr">' . $this->listToText( $fhooks ) . "</td></tr>\n";
205205 }
206206
207207 if ( count( $wgSkinExtensionFunctions ) ) {
208208 $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) );
209 - $out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
 209+ $out .= '<tr><td colspan="3" style="direction:ltr">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
210210 }
211211 $out .= Xml::closeElement( 'table' );
212212 return $out;
@@ -238,7 +238,7 @@
239239 return "<tr>
240240 <td><em>$extension $version</em></td>
241241 <td>$description</td>
242 - <td>" . $this->listToText( (array)$author ) . "</td>
 242+ <td class=\"sv-ext-authors\">" . $this->listToText( (array)$author ) . "</td>
243243 </tr>\n";
244244 }
245245
@@ -331,7 +331,7 @@
332332 } else {
333333 if( is_object( $list[0] ) )
334334 $class = get_class( $list[0] );
335 - else
 335+ else
336336 $class = $list[0];
337337 return "($class, {$list[1]})";
338338 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r45484Pulling back r45448 "Enabling support for RTL langauges in Special:Version ta...brion03:46, 7 January 2009

Comments

#Comment by Danny B. (talk | contribs)   16:32, 6 January 2009

Inline stylsheets are not the best idea. 1) accessibility 2) think about displaying with stylesheets off. I'd suggest to use dir="" instead and in case of necessity class="rtl".

#Comment by Brion VIBBER (talk | contribs)   03:46, 7 January 2009

Reverted in r45484 per notes.

Status & tagging log