Page MenuHomePhabricator

Language names in the template data editor do not have lang or dir attributes
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open the template data editor for a template
  • Click "Add language"
  • Inspect the HTML of the language list

What happens?:

The language names do not have lang or dir attributes.

What should have happened instead?:

The language names should have lang or dir attributes so that they can be correctly rendered/styled.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Change #1025843 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateData@master] Add lang and dir attributes to language search result rows

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

I just had the idea to compare this with how UniversalLanguageSelector solves the problem of the list becoming unreadable when some of the lines are right-aligned, but most aren't. Turns out it sets the lang="…" dir="…" attributes but still forces all lines to be vertically aligned on the left. @Amire80, you are more an expert here. Is it ok to do it like this?

I'm not Amir but I generally agree with https://ux.stackexchange.com/questions/119565/mixed-alignment-ltr-and-rtl-in-language-selection-list - direction is not the same as alignment, the direction should be set correctly, but switching between alignments in a list doesn't look right and is hard to use.

I tried manually setting the dir attribute on the <div>s and here's how it looks when they're not consistently aligned:

lang-name-alignment-square.png (503×573 px, 9 KB)

The RTL names are so far away from the rest of the list that they look like they're missing.

Change #1025843 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Add lang and dir attributes to language search result rows

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

matmarex subscribed.