Last modified: 2012-08-14 10:44:59 UTC
In translatable pages, when the language is RTL, the image alignment is not flipped. This leads to an awkward reading experience[1]. Thumbs have "common/shared.css:/* @noflip */ div.tright", which is why the thumb is not flipped. The wanted behaviour is that image alignment on *only* translatable pages is flipped. [1] https://meta.wikimedia.org/wiki/Wikimedia_Highlights,_May_2012/ar
No, that's not the problem. On rtl pages where you use 'thumb', it should output a tleft instead of a tright. Yet on these 'translatable' pages, it adds a tright anyways. That means that something is still in ltr mode while generating the page, instead of in rtl mode.
Linker::makeImageLink2: 621 if ( $fp['align'] == '' ) { 622 $fp['align'] = $wgContLang->alignEnd(); 623 } This should use the page language from the parser. Throwing to MediaWiki/Parser. Robin introduced the concept, so maybe he can give some comments.
Yes, I am aware of this, and I wanted to fix this already, however the problem is that Linker functions are static so you'd need to know the Title context somehow.
This particular function is only used in the parser (afaict) and in Incubator extension. Maybe it could be moved to the parser itself.
It is used in the parser, the Incubator extension (where I will likely remove it anyway), and two old(er) extensions in SVN (Wikilog and FCKeditor). Moving it to the parser would solve it, but the function "belongs" to Linker (I mean, all similar functions are in Linker, Parser doesn't contain such functions). I'd add a parameter to the function where you pass the parser object. (Relatedly, makeThumbLink2() below it adds magnify-clip.png or magnify-clip-rtl.png based on the wiki content language.. That function could also be changed to use the page content or user language, but in fact I don't see much need for separate images here, IMHO the RTL version can just be removed.)
Submitted proposed fix in https://gerrit.wikimedia.org/r/#/c/17477/ per my comment above
Marking as FIXED, the change is merged.
I note that I had to purge the original reported page, before the change took affect.
Confusing bug title