Page MenuHomePhabricator

editing area on MobileFrontend must be set to the language and the direction of the page's content
Closed, ResolvedPublic

Description

Editing area in MobileFronted inherits the lang and the dir of the HTML page.

Instead of this it must be explicitly set to the lang and dir of the page.

This causes the editing window to show with the wrong direction if the UI language is changed.


Version: unspecified
Severity: normal

Details

Reference
bz69465

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:43 AM
bzimport set Reference to bz69465.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/mVBsrFvV

... Should be an easy thing to fix, but I know nothing about Hogan. With a bit of advice from experienced MF devs I'll be able to fix it myself.

jgonera wrote:

Is there an easy way to get desired text direction for a page in JS? I know I can get page language easily, but can't find direction among JS variables (unless I use VE variables, but that would mean MF depends on VE).

On a Wikimedia desktop site I'd use $.uls.data.getDir(). Unfortunately, this is not desktop, not all sites have ULS installed, and the getDir function is not separated from ULS to a more easily reusable library (it really should be).

If it helps, then you can use the dir and lang values of the #content element - https://en.m.wikipedia.org/wiki/ASCII?uselang=he .

Change 157002 had a related patch set uploaded by JGonera:
Specify lang and dir for the content in editors

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

jgonera wrote:

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

Change 157002 merged by jenkins-bot:
Specify lang and dir for the content in editors

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

Change merged -> RESOLVED/FIXED