Last modified: 2006-07-05 20:00:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7724, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5724 - Add direction marks to stop some annoying problems
Add direction marks to stop some annoying problems
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Normal trivial with 4 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 3016 (view as bug list)
Depends on:
Blocks: rtl
  Show dependency treegraph
 
Reported: 2006-04-26 12:28 UTC by Nadav Perez
Modified: 2006-07-05 20:00 UTC (History)
3 users (show)

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


Attachments
Patch (trunk) (795 bytes, patch)
2006-05-03 08:18 UTC, Rotem Liss
Details
Patch v2 (trunk) (2.44 KB, patch)
2006-05-11 17:08 UTC, Rotem Liss
Details
Patch v3 (trunk) (3.68 KB, patch)
2006-05-12 15:32 UTC, Rotem Liss
Details
Patch if Bug 6100 is not fixed (5.40 KB, patch)
2006-05-19 19:19 UTC, Rotem Liss
Details
Patch if Bug 6100 is fixed (5.01 KB, patch)
2006-05-31 19:23 UTC, Rotem Liss
Details
Patch (trunk) (5.42 KB, patch)
2006-06-11 17:28 UTC, Rotem Liss
Details

Description Nadav Perez 2006-04-26 12:28:09 UTC
When displaying a latin article name AND a latin user name, the editor's
username apears to the right of the article name (between namspace and article
name), breaking normal reading order and making the username unclickable.
a simple rtl mark after the article name should solve this.
Comment 1 Rotem Liss 2006-04-26 14:38:13 UTC
I suggest to add a RTL/LTR mark (depending on the site direction, see the use of
the arrows in the double redirects special page) in such places. RLM is between
the following A and B: A‏B; LRM is between the following A and B: A‎B. You can
also use the entities ‏ and ‎.

A patch may come soon. Please fix it also in REL1_6.
Comment 2 lɛʁi לערי ריינהארט 2006-04-26 15:11:36 UTC
Hallo!

Please see also
http://www.anubite.co.uk/mediawiki/head-rtl/index.php/Mw16:Special_pages/%21list
http://www.anubite.co.uk/mediawiki/head-rtl/index.php/template:Listspecial
http://epov.org/wd-gemet/index.php?title=Template:listspecial&action=edit

The method is quite stable regarding the position of list items with variable /
unpredictable LTR / RTL / bidi content in lists

a) Please start with the lines with ‎|rlm;
b) In order to place unknown (translated / untranslated) MediaWiki messages in a
certain list place you can / should embed them in 
<span dir="ltr|rtl" >message or field</span>&lrm;&rlm;
c) Please define the directionality of character sequences which have bidi
neutral directionality as space, "(", "|", ")", "[", "]" etc. with a ending
&lrm;|&rlm;
d) so far I have seen only timestamps using LTR numbers but thing about
requirements from Bug 5679: Timestamps not rendering in Bangla numerals in bn-wiki

Good luck!

best regards reinhardt [[user:gangleri]]
Comment 3 Rotem Liss 2006-05-03 08:18:19 UTC
Created attachment 1646 [details]
Patch (trunk)

It's a very small patch, but it works on Recentchanges, Watchlist and
Recentchangeslinked. Please check it in.
Comment 4 Rotem Liss 2006-05-03 08:21:29 UTC
The patch is based on a work of r14011 which was done only in trunk, so there
won't be a patch for REL1_6.
Comment 5 lɛʁi לערי ריינהארט 2006-05-03 09:47:37 UTC
(In reply to comment #4)
> The patch is based on a work of r14011 which was done only in trunk, so there
> won't be a patch for REL1_6.

Thanks Rotem Liss!
Unfortunately r14011 does not cover all cases. See
Bug 5807: Improper list alignment with Unicode Character 'ARABIC DAMMA' (U+064F)
Comment 6 Rotem Liss 2006-05-03 09:58:58 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > The patch is based on a work of r14011 which was done only in trunk, so there
> > won't be a patch for REL1_6.
> 
> Thanks Rotem Liss!
> Unfortunately r14011 does not cover all cases. See
> Bug 5807: Improper list alignment with Unicode Character 'ARABIC DAMMA' (U+064F)

I think it's not related.
Comment 7 Rotem Liss 2006-05-04 16:38:54 UTC
Please check in the patch, for this bug is very annoying in the RTL projects,
but its fix is very small and cannot cause problems.
Comment 8 lɛʁi לערי ריינהארט 2006-05-04 17:25:42 UTC
(In reply to comment #7)
> Please check in the patch, for this bug is very annoying in the RTL projects,
> but its fix is very small and cannot cause problems.

Niklas works at Recentchanges.php .
I proposed the changes from
http://nike.users.idler.fi/dev/index.php?title=user:Gangleri/BiDi/sandbox&diff=20065&oldid=20061
to fix
http://nike.users.idler.fi/dev/index.php?title=Toiminnot:Recentchanges&uselang=fa
http://nike.users.idler.fi/dev/index.php?title=Toiminnot:Recentchanges&uselang=he
http://nike.users.idler.fi/dev/index.php?title=Toiminnot:Recentchanges&uselang=de

Hope to get this fixed and that more patches will come soon:
http://nike.users.idler.fi/betawiki/Luokka:Patch/BiDi
and later also other pages as
http://nike.users.idler.fi/dev/index.php?title=%D7%90&action=history&uselang=he

best regards reinhardt [[user:gangleri]]
Comment 9 Rotem Liss 2006-05-11 17:08:06 UTC
Created attachment 1709 [details]
Patch v2 (trunk)

I've created a new, improved patch, which adds two more direction marks in the
right places. The three direction marks are added at the following places (the
explanations assume you use an RTL wiki, but they also apply to LTR wikis if
you read "RTL" instead of "LTR"):
1. Before the edit summary, to prevent confusion when both the user name and
the edit summary start is LTR.
2. Before and after the user name in the signatures, to prevent confusion when
both the end of sentence and the user name are LTR, or when both the user name
and the date/time are LTR.
3. After the user name in the changes list (recentchanges, recentchangeslinked,
watchlist, etc.), to prevent the very popular and very, very annoying confusion
when both the user name and the page name are LTR, and the smaller confusion
when both the user name and the date/time are LTR.
These three fixes stop the annoying problems – especially the third one –
and make no harm as far as I've checked.
Comment 10 Rotem Liss 2006-05-12 15:32:44 UTC
Created attachment 1713 [details]
Patch v3 (trunk)

This patch also does the following things:
* Documents the function Language::getDirMark, which was not documented.
* Replaces the entities with real marks in Language::getDirMark, to prevent
problems when the HTML is not parsed (edit summaries), or when editing the page
with signatures (a hidden character isn't annoying to see like an entity).
* Adds a mark between the edit summary and the log action text in the recent
changes (in the last patch it wasn't possible, because the entities, which were
not parsed, were used).

Please check this patch in, because the problems are very annoying.
Comment 11 Rotem Liss 2006-05-19 19:19:03 UTC
Created attachment 1793 [details]
Patch if Bug 6100 is not fixed

This patch also adds the direction mark:
* Between the image file name and the info about it, because the image
extension is most likely in English, and so is the number of kilobytes in the
info, and it will confuse the text direction and make the link to the image
unclickable in Gecko browsers.
* Between the user name and the log entry in the log page, as in the move page,
a user in English moves a page in English may confuse the direction.
Please check this patch in, the bug is very annoying but the patch is small.
Comment 12 Rotem Liss 2006-05-20 14:50:57 UTC
*** Bug 3016 has been marked as a duplicate of this bug. ***
Comment 13 Pablo Saratxaga 2006-05-26 23:28:35 UTC
I think Lang should be used instead of LangCont
Comment 14 Rotem Liss 2006-05-27 07:03:34 UTC
(In reply to comment #13)
> I think Lang should be used instead of LangCont

I don't think so, as the page direction is not changed when the language is
changed (just another bug, because the whole page direction should be changed,
although the content itself should be in the content direction).
Comment 15 Pablo Saratxaga 2006-05-28 22:52:54 UTC
I mean for the dirmar, it should be wgLang->DirMark(), as the prupose of those
is to fix the ordering of the elements of the line for the *user language*.

In the patch for bug #6100 I put much more dirmark (from Lang, not ContLang) in
all the lists, logs, etc. between the different elements, so they show in the
proper ordering according to user language directionality.
Additionally, article links get enclosed in <span dir=ltr|rtl> </span> in the
case when wiki direction is different from user language direction (that way,
the article name are displayed correctly in those list, logs, etc)

I agree that in getUserSig() ContLang should be used, but in all other cases, it
should be Lang instead.

Try testing viewing an RTL wiki with a uselang in LTR; or the other way, and you
will see that the dirmarks should indeed be in the user language directionality
not in the wiki directionality.
Comment 16 Rotem Liss 2006-05-29 18:28:34 UTC
(In reply to comment #15)
> I mean for the dirmar, it should be wgLang->DirMark(), as the prupose of those
> is to fix the ordering of the elements of the line for the *user language*.
> 
> In the patch for bug #6100 I put much more dirmark (from Lang, not ContLang) in
> all the lists, logs, etc. between the different elements, so they show in the
> proper ordering according to user language directionality.
> Additionally, article links get enclosed in <span dir=ltr|rtl> </span> in the
> case when wiki direction is different from user language direction (that way,
> the article name are displayed correctly in those list, logs, etc)
> 
> I agree that in getUserSig() ContLang should be used, but in all other cases, it
> should be Lang instead.
> 
> Try testing viewing an RTL wiki with a uselang in LTR; or the other way, and you
> will see that the dirmarks should indeed be in the user language directionality
> not in the wiki directionality.

If I use a Hebrew wiki, and watch in the English language, the whole page
remains *RTL*, and the parts of the text I want to avoid confusion with remain
RTL. Of course other parts of the interface are confused, but I don't try to
avoid it this patch. If a user with an English name edits a page with an English
name in a Hebrew wiki, they are confused, and I want to use RLM to avoid it;
however, if I change the user language to English (by "uselang", or by the
preferences), the page direction is not changed, and the user name and page are
still confused. Then I use the English direction mark – LRM – but it doesn't
solve the problem. I have to use $wgContLang since the page direction is set by
$wgContLang; and although there are some confusions if I use, for example,
http://he.wikipedia.org/w/index.php?title=Special:Recentchanges&uselang=en –
they are not related to this bug, but are another bug should be fixed.
Comment 17 Rotem Liss 2006-05-31 19:23:34 UTC
Created attachment 1866 [details]
Patch if Bug 6100 is fixed

Now that we change the page direction by the user language, we should use
$wgLang. Using it.

Please commit this fix – it is very needed and makes no harm.
Comment 18 Rotem Liss 2006-06-01 09:01:11 UTC
Comment on attachment 1793 [details]
Patch if Bug 6100 is not fixed

If Bug 6100 is not fixed, check in this patch.
Comment 19 Rotem Liss 2006-06-01 09:01:36 UTC
Comment on attachment 1866 [details]
Patch if Bug 6100 is fixed

If Bug 6100 is fixed, commit this patch instead.
Comment 20 Rotem Liss 2006-06-11 17:28:56 UTC
Created attachment 1937 [details]
Patch (trunk)

Just commit that one, it fixes all the problems.
Comment 21 Rotem Liss 2006-07-05 20:00:41 UTC
Fixed everything, except for the signature issue.

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


Navigation
Links