Page MenuHomePhabricator

Please preserve paragraph directionality in diff
Open, NormalPublic

Description

(this is most meaningful for RTL wikis, but probably good for all)
The new diff introduced in 1.20 is great. however, it would be even better if the diff section would use the same directionality (aka "bidi", aka "ltr/rtl") as the paragraph being compared.

specifically, all RTL wikis contain significant pieces in ltr, and the diff is way less useful when it does not respect the directionality of the segment being compared.

peace.


Version: 1.20.x
Severity: normal

Details

Reference
bz36340

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 12:21 AM
bzimport set Reference to bz36340.
bzimport added a subscriber: Unknown Object (MLST).
Kipod created this task.Apr 29 2012, 5:28 PM

Another blocker for Bug #745! w00!

It is only possible to know the direction of the page content (thanks to the page content language) but it's not possible to know the direction of a specific section. Unless we use dir="auto" but I'm not sure that would be good.

As Robin says, this is one of those bugs that would be solved if MediaWiki would treat paragraphs and sections as real objects and not as parts of a big blob, which is the whole page's wikitext. You know, like one of the best-known three-digit bugs, Bug 738.

<choir-of-angels>
It may get solved in the Bright Future Days of the Visual Editor, if the bidirectional requirements that I (and Robin) wrote are implemented:

http://www.mediawiki.org/wiki/Visual_editor/Bidirectional_text_requirements
</choir-of-angels>

dir="auto" is probably not that good. To begin with, it will treat all paragraphs that begin with an HTML tag as ltr.

Kipod added a comment.May 1 2012, 11:32 PM

FWIW, i added to my common.js the following line, which makes the little "+" or "-" marker of the diff an rtl/ltr toggle:

$(function(){$('td.diff-marker').click(function(){var next=$(this).next(),dir=next.css('direction');next.css('direction', (dir=='rtl')?'ltr':'rtl');})});

i still think it shouldn't be impossible to utilize the parser API, maybe together with jquery, so we can deduce the directionality of the paragraph or section.

peace.

Aklapper set Security to None.
Ebraminio moved this task from Backlog to MediaWiki-core on the RTL board.Aug 9 2015, 11:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2015, 11:48 AM
Amire80 moved this task from Untriaged to RTL on the I18n board.Feb 28 2018, 12:29 PM