Page MenuHomePhabricator

Right to left text is aligned left to right in table
Closed, ResolvedPublic3 Story Points

Description

As someone who reads an RTL language, I want to read the respective rows (e.g. hebrew) right-aligned in order to not be confused.

Problem:
Hebrew labels, descriptions and aliases are currently not right-aligned, but they should be.

Example:
https://wikidata-shex.wmflabs.org/wiki/Schema:O9

Acceptance criteria:

  • Hebrew and other RTL languages are right-aligned in the table.

Event Timeline

Michael created this task.Mar 25 2019, 11:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 25 2019, 11:47 AM

dir="auto" on the individual table cells seems to fix it.

Also, the whole table should go right-to-left in RTL languages (with “edit” links on the left). dir="auto" on the whole table seems to fix that, too.

Lucas_Werkmeister_WMDE set the point value for this task to 3.Mar 25 2019, 2:21 PM
Michael claimed this task.Mar 25 2019, 3:47 PM
Michael moved this task from Backlog to Doing on the Shape Expressions Sprint 5 board.
Restricted Application added a project: User-Michael. · View Herald TranscriptMar 25 2019, 3:48 PM
Addshore moved this task from incoming to in progress on the Wikidata board.Mar 25 2019, 4:00 PM

Change 498929 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseSchema@master] Align table rows language-dependent

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

Also, the whole table should go right-to-left in RTL languages (with “edit” links on the left). dir="auto" on the whole table seems to fix that, too.

That doesn't seem to work for me. Part of the reason seems to be that the content-language is always set to en and direction is always ltr:

<div id="mw-content-text" dir="ltr" class="mw-content-ltr" lang="en">

Change 499176 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseSchema@master] Ensure Schema content language follows ui language

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

Also, the whole table should go right-to-left in RTL languages (with “edit” links on the left). dir="auto" on the whole table seems to fix that, too.

That doesn't seem to work for me. Part of the reason seems to be that the content-language is always set to en and direction is always ltr:

<div id="mw-content-text" dir="ltr" class="mw-content-ltr" lang="en">

I think we might be referring to different things? On my system, dir="auto" on the <table> makes the table columns go right-to-left, with the “edit” link on the left. But the whole table is still left-aligned on the page due to the content language – is that what you meant?

I think we might be referring to different things? On my system, dir="auto" on the <table> makes the table columns go right-to-left, with the “edit” link on the left. But the whole table is still left-aligned on the page due to the content language – is that what you meant?

Setting the dir="auto" attribute on the <table> tag on https://wikidata-shex.wmflabs.org/wiki/Schema:O2?setlang=he doesn't change anything for me. Which feels plausible, since the lang attribute on the parent element is still en?

Change 498929 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Align table rows language-dependent

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

Oh, I know why – use uselang=ar, not he. The table headings aren’t translated yet into Hebrew.

Change 499176 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Ensure Schema content language follows ui language

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

Lydia_Pintscher closed this task as Resolved.Apr 8 2019, 8:34 AM
Lydia_Pintscher moved this task from Verification to Done on the Shape Expressions Sprint 5 board.
Lydia_Pintscher added a subscriber: Lydia_Pintscher.

\o/