r90734 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90733‎ | r90734 | r90735 >
Date:20:25, 24 June 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
(bug 12406) Pages with names in RTL scripts are not listed correctly in Special:Whatlinkshere -> add a direction mark

The direction mark is no longer needed when bug 6100 is fixed, but this fixes it for the meantime.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -310,9 +310,10 @@
311311 $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'] );
312312 $wlh = Xml::wrapClass( "($wlhLink)", 'mw-whatlinkshere-tools' );
313313
 314+ $dirmark = wfUILang()->getDirMark();
314315 return $notClose ?
315 - Xml::openElement( 'li' ) . "$link $propsText $wlh\n" :
316 - Xml::tags( 'li', null, "$link $propsText $wlh" ) . "\n";
 316+ Xml::openElement( 'li' ) . "$link $propsText $dirmark $wlh\n" :
 317+ Xml::tags( 'li', null, "$link $propsText $dirmark $wlh" ) . "\n";
317318 }
318319
319320 protected function listEnd() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r90742Directionality and language improvements as part of bug 6100 (under $wgBetter...robin22:10, 24 June 2011
r90743Directionality improvements as part of bug 6100 (under $wgBetterDirectionality):...robin23:01, 24 June 2011
r91315* Add release notes for my recent commits (bug 6100 and others like bugs 2803...robin22:50, 1 July 2011
r91518(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionali...robin02:26, 6 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r14495* (bug 6100) BiDi: different directionality for user interface and wiki conte...nikerabbit15:19, 31 May 2006
r44000(bug 6100) Strip Unicode BiDi embedding/override characters (U+202A - U+202E)...vyznev20:11, 27 November 2008
r60786Make LTR wgLang do the right thing on RTL wgContLang wikis. See bug 6100 and...mah09:32, 7 January 2010
r90264(part of bug 6100) Set the directionality based on user language instead of c...robin11:32, 17 June 2011
r90320Follow-up to r90265: directionality improvements as part of bug 6100 (under $...robin21:48, 17 June 2011
r90334Follow-up to r90265: directionality improvements as part of bug 6100 (under $...robin13:12, 18 June 2011
r90517* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang whe...robin10:14, 21 June 2011
r90581Directionality improvements as part of bug 6100 (under $wgBetterDirectionalit...robin13:10, 22 June 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   20:40, 24 June 2011

In what way will the direction mark no longer be needed when bug 6100 is fixed? Page titles can be either LTR or RTL, and can appear in either an LTR or an RTL interface; that will still be the case, it'll just change some of the RTL interfaces to LTR and some of the LTR interfaces to RTL.

#Comment by SPQRobin (talk | contribs)   20:56, 24 June 2011

With $wgBetterDirectionality enabled and this direction mark omitted, all LTR/RTL text displayed properly.

Probably because using an RTL interface on an LTR wiki (and vice versa maybe also) caused the problem: the text was messed up because it was RTL text while the entire interface and content is supposed to be LTR (i.e. also when having an RTL language as interface).

#Comment by Brion VIBBER (talk | contribs)   22:28, 24 June 2011

Still wrapping my brain around it. ;)

Some screen shots of the mixed-bidi scenario before this commit (back at r90700) and after (as of r90740):

Whatlinkshere-bidi-examples.png

With full bug 6100 fix in, the cases where UI language is English should always show LTR overall, while the cases where UI language is Arabic should always show RTL overall... in theory that eliminates the mixed view case so they should just keep working....? heh

#Comment by Brion VIBBER (talk | contribs)   22:30, 24 June 2011

(that is -- the cases where UI language matches UI direction have no failure from the title of other directionality in either before or after.)

#Comment by SPQRobin (talk | contribs)   23:56, 24 June 2011

With the direction marker it will work always, and with bug 6100 fixed also, so we're double safe :)

Status & tagging log