Page MenuHomePhabricator

Block end timestamp should use the right direction in logs
Closed, ResolvedPublic

Description

Please look at the following two examples:

http://fa.wikipedia.org/w/index.php?title=%D9%88%DB%8C%DA%98%D9%87%3A%D8%B3%DB%8C%D8%A7%D9%87%D9%87%E2%80%8C%D9%87%D8%A7&type=block&user=Behzad.Modares&page=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1%3AKomeil+4life&year=&month=-1&tagfilter=

http://ar.wikipedia.org/w/index.php?title=%D8%AE%D8%A7%D8%B5%3A%D8%B3%D8%AC%D9%84&type=block&user=%D8%BA%D9%84%D8%A7%D9%85+%D8%A7%D9%84%D8%A3%D8%B3%D9%85%D8%B1&page=%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85%3A212.118.5.66&year=&month=-1&tagfilter=

In both cases, the ending time of a block is changed, but because of the right-to-left layout of the wiki, the ending time is shown in an unreadable fashion. The solution would be as simple as applying a "direction:ltr" style to the <span> element which holds the new block expiration time. However, at the moment the span element doesn't have a class attribute; for example, in the first example above, the <span> looks like this:

<span title="2010-11-30T05:16:29Z">2010-11-30T05:16:29Z</span>

Solution would be to make it like this:

<span class="blockExpiry" title="2010-11-30T05:16:29Z">2010-11-30T05:16:29Z</span>

And to add the following to the default RTL CSS file:

.blockExpiry {

direction:ltr;

}


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=27485

Details

Reference
bz25839

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:14 PM
bzimport set Reference to bz25839.
bzimport added a subscriber: Unknown Object (MLST).
Huji created this task.Nov 8 2010, 2:48 PM

Fixed in r76309, by adding both the class and dir="ltr" because the suggested CSS didn't work (presumably due to dir="rtl" on an ancestor <div>).

It seems very strange to set dir="ltr" on a span that may contain RTL text, and I expected it to mess up the Arabic text for "1 week", but it didn't. If it turns out this does cause something else to display wrongly, the fix for this bug should be reverted.

Huji added a comment.Feb 17 2011, 1:31 PM

It seems the solution is not complete, per bug 27485. The LTR rendering should be limited to the cases where the expiry is a timestamp.

  • Bug 27485 has been marked as a duplicate of this bug. ***
Huji added a comment.Feb 18 2011, 12:12 AM

In continuation to my discussion here and in bug 27485, another possible solution can be to localize the expiration dates too. Right now, they look like 2010-11-30T05:16:29Z which is LTR-friendly only. Localizing them (so for example, the Persian message would be ۲۰۱۰-۱۱-۳۰ ساعت ۰۵:۱۶:۲۹ گرینویچ can totally solve the issue of directionality.

This is fixed in trunk (1.19) because bug 6100 is fixed.

Restricted Application added a project: I18n. · View Herald TranscriptJun 2 2015, 2:20 PM