Page MenuHomePhabricator

RTL languages in glosses should be aligned to right
Closed, ResolvedPublic2 Story Points

Description

Problem:
RTL language Glosses (like Hebrew) are not aligned to the right side like RTL languages should be.

Example:
https://wikidata.beta.wmflabs.org/wiki/Lexeme:L60

Screenshot:

Acceptance criteria:

  • Gloss directionality is marked-up per gloss language

Info

Possible solutions

  • apply dir attribute to the parent block element (in this case td) if possible.
  • instead of span, we can use a block element that supports dir attribute, such as p or div.
  • change the display style of the span element containing the gloss value to block

Event Timeline

KaMan created this task.Aug 29 2018, 12:55 PM
Restricted Application added a project: I18n. · View Herald TranscriptAug 29 2018, 3:32 PM
Greta_Doci_WMDE removed Lea_Lacroix_WMDE as the assignee of this task.Aug 29 2018, 4:17 PM
Greta_Doci_WMDE edited subscribers, added: Greta_Doci_WMDE; removed: Lexicographical data.

@Lydia_Pintscher I think that's pretty important.

More precisely, every gloss must have correct lang and dir HTML attributes, whether it's RTL or LTR. Correct alignment should come with it automatically, and fixed by hand only if necessary.

Lydia_Pintscher triaged this task as High priority.Sep 2 2018, 3:14 PM
Lydia_Pintscher added a project: WMDE-Design.
Restricted Application added a project: Design. · View Herald TranscriptSep 2 2018, 3:14 PM

We already set the correct lang and dir attributes server-side (though I don’t know if we also do it when rebuilding the UI in JavaScript after editing), but apparently that’s not enough. As I wrote in T202618: Glosses of sense are not aligned correctly, setting display: block on the <span> surrounding the text appears to have the desired effect, but I’m not sure if that’s the best solution.

Lydia_Pintscher moved this task from Incoming to Ready to go on the Wikidata-Campsite board.
alaa_wmde updated the task description. (Show Details)Apr 15 2019, 7:46 AM

Note: display: inline-block correctly aligns multi-line glosses, but doesn’t move single-line glosses all the way to the right of the surrounding table. I think we want display: block.

alaa_wmde updated the task description. (Show Details)Apr 16 2019, 12:21 PM
alaa_wmde updated the task description. (Show Details)Apr 16 2019, 2:36 PM
alaa_wmde set the point value for this task to 2.Apr 16 2019, 2:39 PM

Change 504517 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] RTL languages in glosses should be aligned to right

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

Change 504517 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] RTL languages in glosses should be aligned to right

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