Last modified: 2012-08-14 10:44:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 38351 - Default alignment of images does not respect the page title language and uses the content language alignment
Default alignment of images does not respect the page title language and uses...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: High normal (vote)
: 1.20.0 release
Assigned To: Nobody - You can work on this!
https://meta.wikimedia.org/wiki/Wikim...
: i18n, patch-need-review
Depends on:
Blocks: rtl
  Show dependency treegraph
 
Reported: 2012-07-12 03:05 UTC by Siebrand Mazeland
Modified: 2012-08-14 10:44 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Siebrand Mazeland 2012-07-12 03:05:37 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
Comment 1 Derk-Jan Hartman 2012-07-12 18:34:53 UTC
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.
Comment 2 Niklas Laxström 2012-07-12 22:46:50 UTC
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.
Comment 3 Robin Pepermans (SPQRobin) 2012-07-13 01:33:43 UTC
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.
Comment 4 Niklas Laxström 2012-07-13 01:43:28 UTC
This particular function is only used in the parser (afaict) and in Incubator extension. Maybe it could be moved to the parser itself.
Comment 5 Robin Pepermans (SPQRobin) 2012-08-01 02:26:18 UTC
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.)
Comment 6 Robin Pepermans (SPQRobin) 2012-08-02 22:50:32 UTC
Submitted proposed fix in https://gerrit.wikimedia.org/r/#/c/17477/ per my comment above
Comment 7 Robin Pepermans (SPQRobin) 2012-08-03 20:18:50 UTC
Marking as FIXED, the change is merged.
Comment 8 Derk-Jan Hartman 2012-08-14 09:41:20 UTC
I note that I had to purge the original reported page, before the change took affect.
Comment 9 Daniel Friesen 2012-08-14 10:44:59 UTC
Confusing bug title

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links