Page MenuHomePhabricator

Correctly show schema text in right-to-left languages
Closed, ResolvedPublic

Description

Currently, the schema text looks broken if the user language is right-to-left:

Screen Shot 2019-03-26 at 17.27.51.png (720×1 px, 103 KB)

We need to make sure the schema text always goes left-to-right. This can be done by setting dir="ltr" on the element or by wrapping it inside a [<bdi> element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi).

We also need to think about what to do with the edit links. Due to automatic flipping, they currently float to the left in RTL languages, but if the schema text goes left-to-right then they’ll collide (the first lines of the schema text will move out of the way to accommodate the floating section). We can instruct CSSJanus not to flip them, but then what should happen to the order of the links? Should they still be swapped even if the link group floats in the same place in languages of either direction?

Event Timeline

Change 500057 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseSchema@master] Fix direction of schema text

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

Change 500057 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Fix direction of schema text

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