r81622 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81621‎ | r81622 | r81623 >
Date:12:39, 7 February 2011
Author:tstarling
Status:ok (Comments)
Tags:
Comment:
Use the content language to set the skin direction, instead of the user language. This makes the content readable and the UI messed up, instead of vice versa.

It's not ideal, but at least it's no worse than it was in 1.16. It's preferable because the content area is more likely to have bidirectional text than the UI area. The UI is split up into short strings, generally in a consistent language, so there is less chance of the UBA moving fragments of text around.

Ideally, the direction of each div would be set according to the language of the text it contains.
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderContext.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
@@ -91,7 +91,8 @@
9292 if ( $this->direction === null ) {
9393 $this->direction = $this->request->getVal( 'dir' );
9494 if ( !$this->direction ) {
95 - $this->direction = Language::factory( $this->language )->getDir();
 95+ global $wgContLang;
 96+ $this->direction = $wgContLang->getDir();
9697 }
9798 }
9899 return $this->direction;

Follow-up revisions

RevisionCommit summaryAuthorDate
r816541.17: MFT r78372, r79324, r80841, r81430, r81488, r81496, r81554, r81561, r81...catrope22:28, 7 February 2011
r90264(part of bug 6100) Set the directionality based on user language instead of c...robin11:32, 17 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   16:03, 7 February 2011

Ideally yes. Unfortunately the ResourceLoader has not made this any easier in practise – it might even be harder now, since it suggests and to some extent enforces the paradigm that everything in one page is only in one direction.

Status & tagging log