Page MenuHomePhabricator

Global user pages must have the direction of the global wiki
Open, LowPublic

Description

My Meta user page, in English, is adjusted RTL when shown on ar.wikipedia.org. See: https://meta.wikimedia.org/wiki/User:Wikiklaas and https://ar.wikipedia.org/wiki/%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85:Wikiklaas
I guess English language pages should be adjusted LTR, also on projects that have RTL adjustification. Adding a div with textdir=ltr language=en did not help.

Event Timeline

Wikiklaas raised the priority of this task from to Needs Triage.
Wikiklaas updated the task description. (Show Details)
Wikiklaas added a project: GlobalUserPage.
Wikiklaas added a subscriber: Wikiklaas.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 24 2015, 6:23 PM
Amire80 added a subscriber: Amire80.

@Wikiklaas, if I look at your user page at the Arabic Wikipedia now, it appears correctly. Are you sure that it's still a problem?

Amire80 added a comment.EditedMar 28 2015, 5:13 PM

... That said, it's because of the HTML you added. The extension should add this HTML automatically. If I look at my user page at the Yiddish Wikisource, it's broken - it is RTL, but should be LTR.

You can use mw-content-ltr class.

Yes, and that's what @Wikiklaas did, more or less, but it should be automatic.

To make sure I understand this bug properly, the extension should automatically add <div lang="en" dir="ltr" class="mw-content-ltr"> (and the closing div tag)?

Kind of, but more precisely:

  • lang must be the page language (getPageLanguage(); in practice equal to the wiki's content language, but this may change in the future)
  • dir must be the dir of that language (getDir())
  • class must match the dir

For the case of Wikimedia, it's Meta, and it's en and rtl, but for other installations it may be different.

Thanks for your comments. As you say this should be done automatically, I removed the div for the text-direction. I did now get a Flash Of Unstyled Content, showing the text ltr, but then the rtl Arabic css took over.

Izno awarded a token.Jun 25 2015, 8:39 PM
Izno added a subscriber: Izno.
Meno25 added a subscriber: Meno25.Jul 9 2015, 2:55 PM
Ladsgroup moved this task from Backlog to MediaWiki-core on the RTL board.Jul 15 2015, 7:48 PM
Amire80 triaged this task as Low priority.Jul 16 2015, 3:12 PM

Change 228617 had a related patch set uploaded (by Legoktm):
Use 'PageContentLanguage' hook to set proper lang & div attributes

https://gerrit.wikimedia.org/r/228617

Change 228618 had a related patch set uploaded (by Legoktm):
Set an explicit 'wgLanguageCode' entry for metawiki

https://gerrit.wikimedia.org/r/228618

Amire80 renamed this task from LTR pages adjusted RTL on arabic languages to Global user pages must have the direction of the global wiki.Feb 28 2018, 12:29 PM
Restricted Application added a subscriber: alanajjar. · View Herald TranscriptFeb 28 2018, 12:29 PM
Amire80 moved this task from Untriaged to RTL on the I18n board.Feb 28 2018, 12:29 PM
Meno25 removed a subscriber: Meno25.Nov 23 2018, 8:03 AM