Page MenuHomePhabricator

BiDI: please preserve dir="ltr" and dir="rtl" in TOC
Closed, InvalidPublic

Description

Author: gangleri

Description:
URL will follow

‪Hello!‬

<span dir="ltr" >Welcome!</span>

will generate the following TOC at a RTL type wiki:

Hello!‬
!Welcome

Please compare the titles in the TOC and the section names!‬

  1. ‪the first is OK, "!" is at right end‬
  2. ‪the second is wrong; "!" should be at right end

regards reinhardt [[user:gangleri]]


Version: unspecified
Severity: trivial
URL: http://yi.wiktionary.org/wiki/project:bugzilla/04039

Details

Reference
bz4039

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:57 PM
bzimport added projects: MediaWiki-Parser, I18n.
bzimport set Reference to bz4039.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Nov 20 2005, 8:56 PM

gangleri wrote:

*** Bug 2405 has been marked as a duplicate of this bug. ***

gangleri wrote:

changed the subject

If you look at the generated code of the TOC at
[[wiktionary:yi:project:bugzilla/04039]] you will see:

<table id='toc' class='toc'>
<tr>
<td>
<div id='toctitle'>
<h2>אינהאַלט</h2>
</div>
<ul>
<li class='toclevel-1'><a href="#follow_the_links"><span
class="tocnumber">1</span> <span class="toctext">follow the links</span></a></li>
<li class='toclevel-1'><a href="#.E2.80.AAHello.21.E2.80.AC"><span
class="tocnumber">2</span> <span class="toctext">‪Hello!‬</span></a></li>

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext">Welcome!</span></a></li>
</ul>
</td>
</tr>
</table>

the *actual* <span class="toctext">Welcome!</span> should preserve dir="ltr"
from the section title which is

<span dir="ltr" >Welcome!</span>

Preserving dir="ltr" and dir="rtl" in TOC would be a much better solution as
using general punctuation characters.
See them at
http://www.fileformat.info/info/unicode/block/general_punctuation/list.htm

best regards reinhardt [[user:gangleri]]

brion added a comment.Nov 30 2005, 9:55 PM

... huh?

Closing INVALID, reopen if you can explain in comprehensible English.

gangleri wrote:

Slowly:

If you want to write a message to a contributor at [[ar:]], [[ur:]] and you know
that this contributor does not understand the content language (because he takes
care of InterLanguage links etc.) you probably will write in English.

These wiki's are RTL.

If you make a new section *typing*

Welcome!

the build in BiDi mechanism of the browser will generate somthing that *looks*
like *!Welcome* both in the TOC and as the header of the section.

I tried varios variants:
a) *typing*

!Welcome

which *displayes* both in the TOC and as the header of that section as *Welcome!*
This is a kind of workaround but is ugly.

b) I tried using general punctuation characters *typing*

&#8234;Hello!&#8236

Opticaly this is fine but the anchor contains the general punctuation characters:
#.E2.80.AAHello.21.E2.80.AC
This solution is not suitable.

c) I tried

<span dir="ltr" >Welcome!</span>

Now the header of the section generates fine but what you *see* as header is
*Welcome!*
and is *not* the same as what is in the TOC
*!Welcome*

The request for this bug report.
What is generated at this moment for c) is

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext">Welcome!</span></a></li>

You see that both *<span dir="ltr" >* and *</span>* is "filtered".

What should be generated is

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext"><span dir="ltr" >Welcome!</span></span></a></li>

I mean that *toctext* should preserve whatever was in the header. Please do
*not* concatenate / do not use <span class="toctext" dir="ltr" > because other
examples could use nested span dir="foo".

best regards reinhardt [[user:gangleri]]

gangleri wrote:

*note*
At
http://yi.wiktionary.org/w/index.php?title=project:bugzilla/04039&action=history
you will experience
Bug 4987: The "autocomment" link differs from the TOC link if <font ... /> or
<font ...> ... </font> is used.

This is not a MediaWiki bug, but a part of a family of feature requests to make true BiDi editing easier. Currently it can be solved by inserting LRMs in the right places. Common people don't like it, but there's nothing better.

The right thing to do to solve this on talk pages is to have ace RTL support on LiquidThreads (Bug 20934).