Page MenuHomePhabricator

BiDi: minimize the mess in MediaWiki messages caused by BiDi-characters when using a RTL user interface at a LTR wiki and viceversa
Closed, ResolvedPublic

Description

Author: gangleri

Description:
Hallo!

To follow the links mentioned below you need
a1) to log in to [[:eo:]]
a2) and change your interface language to *Hebrew* at [[:eo:special:Preferences]]
a3) click on
http://eo.wikipedia.org/w/index.php?title=page_does_not_exist&action=edit
b1) to log in to [[:yi:]]
b2) and change your interface language to *English* at [[:yi:special:Preferences]]
b3) click on
http://yi.wikipedia.org/wiki/Page_does_not_exist
c1) to log in to [[:he:]]
c2) and change your interface language to *English* at [[:he:special:Preferences]]
c3) click on
http://he.wikipedia.org/wiki/Page_does_not_exist

Preliminary: How MediaWiki works today:
With the exception of [[Special:Version]] standard BiDi rendering follows the
*content language* and does not care about the differences of RTL / LTR
rendering between *selected interface language* and *content language*.
See
bug: [[Special:Version]] should be wrapped with <div dir="ltr"> ... </div>

Scope:
This bug report is about changing the rendering of BiDi characters in the
MediaWiki messages according to the *selected interface* and *not* to the
content language.

Afected / relevant BiDi characters in MediaWiki messages:
(from practice; please find required documentation for all characters)
",", ".", "!", "?", ":", "(", ")", "[", "]", "{", "}", "|" ... which renders
depending on RTL / LTR *context*

Proposed solution:
Probably a beter way then using general
<div dir="foo"> ... </div>
or
<span dir="bar"> ... </div>

would be to use
&#8237;<BiDi character>&#8236;
if the character has to be written inside a LTR MediaWiki message:
&#8238;<BiDi character>&#8236;
if the character has to be written inside a RTL MediaWiki message:

compare with
bug 3953: BiDi issues related to the "In other language" section should be fixed
in Names.php

How it works:
*example 3:*
Please note that at
http://he.wikipedia.org/wiki/Page_does_not_exist
the text is like
.There is currently no text in this page, you can search for this page title in
other pages or edit this page
*note* that the "." character is *at the beginning!

*example 3:*
Please note that at
http://he.wikipedia.org/wiki/Page_does_not_exist
the text is like
.There is currently no text in this page, you can search for this page title in
other pages or edit this page
*note* that the "." character is at the *beginning*!

*example 2:*
Please note that at
http://yi.wikipedia.org/wiki/Page_does_not_exist
There is currently no text in this page, you can search for this page title in
other pages or edit this page.
*note* that the "." character is at the *end*!
This is because of the *changes made at*
http://yi.wikipedia.org/w/index.php?diff=6978&oldid=6977

*example 1:*
Please note that at
http://eo.wikipedia.org/w/index.php?title=page_does_not_exist&action=edit
:כתוב כאן את הטקסט עבור הדף החדש
*note* that the ":" character is at the *left*!
This is because of the *changes made at*
http://eo.wikipedia.org/w/index.php?diff=320159&oldid=320157
Without the change the text would look like
כתוב כאן את הטקסט עבור הדף החדש:
*note* that the ":" character is at the *left*!

*note*

  1. Many MediaWiki messages are containing variables $1, $2 etc. When evaluated

their content can be / become LTR, RTL or BiDi .

  1. Many MedaiWiuki messages are used as a piece inside a special page together

with other content.

These situations have a greater complexity and BiDi adaptations should be done
after the simpler ones are working properly.

Resolution will be changed to *LATER*.
Debendency on blucks bug 745.

Please do not hesitate to contact me if you have any questions.

regards reinhardt [[user:gangleri]]


Version: unspecified
Severity: enhancement
URL: http://eo.wikipedia.org/w/index.php?diff=320159&oldid=320157

Details

Reference
bz3954

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:55 PM
bzimport set Reference to bz3954.
bzimport added a subscriber: Unknown Object (MLST).

pablo wrote:

the patch in bug #6100 may fix some of the problems.

Dear Reinhardt,
A lot of bidi and RTL improvements have been made lately. Could you please update on the status of this request?

(In reply to comment #0)

How it works:
*example 3:*
Please note that at
http://he.wikipedia.org/wiki/Page_does_not_exist
the text is like
.There is currently no text in this page, you can search for this page title
in
other pages or edit this page
*note* that the "." character is *at the beginning!

I tried with your steps and this is not the case anymore with 1.21wmf6 and Firefox 17.0.1.

*example 2:*
Please note that at
http://yi.wikipedia.org/wiki/Page_does_not_exist
There is currently no text in this page, you can search for this page title
in
other pages or edit this page.
*note* that the "." character is at the *end*!
This is because of the *changes made at*
http://yi.wikipedia.org/w/index.php?diff=6978&oldid=6977

Going back to the previous revision at http://yi.wikipedia.org/w/index.php?title=%D7%9E%D7%A2%D7%93%D7%99%D7%A2%D7%B0%D7%99%D7%A7%D7%99:Noarticletext/en&oldid=6977 also displays the "." character at the end.

*example 1:*
Please note that at
http://eo.wikipedia.org/w/index.php?title=page_does_not_exist&action=edit
:כתוב כאן את הטקסט עבור הדף החדש
*note* that the ":" character is at the *left*!
This is because of the *changes made at*
http://eo.wikipedia.org/w/index.php?diff=320159&oldid=320157
Without the change the text would look like
כתוב כאן את הטקסט עבור הדף החדש:
*note* that the ":" character is at the *left*!

Going back to the previous revision at http://eo.wikipedia.org/w/index.php?title=MediaWiki:Newarticletext/he&oldid=320157 it is also displayed correctly.

Hence this has been fixed in the meantime.