Page MenuHomePhabricator

lang and dir attributes are not applied to mw-content-text on redirects
Closed, ResolvedPublic

Description

lang and dir attributes are not applied to mw-content-text on a page that redirects to a file.

On a redirect to a content they are applied.

This causes the arrow in the redirect icon to point the wrong way when the user changes the UI language, and may cause other problems as well.

Example:
https://commons.wikimedia.org/w/index.php?title=File:Yhaplotree_svg.svg&redirect=no&uselang=he


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:25 AM
bzimport set Reference to bz58955.
bzimport added a subscriber: Unknown Object (MLST).

It's the same with any redirect: random example from Meta https://meta.wikimedia.org/w/index.php?title=!vote&redirect=no&uselang=he

<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="redirectMsg"><img src="//bits.wikimedia.org/static-1.24wmf18/skins/common/images/redirectltr.png" alt="#REDIRECT" /><span class="redirectText"><a href="/wiki/Don%27t_vote_on_everything" title="Don't vote on everything">Don't vote on everything</a></span></div>

Change 266582 had a related patch set uploaded (by TheDJ):
Add mw-content-ltr|rtl to file redirect pages

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

Change 266582 merged by jenkins-bot:
[mediawiki/core@master] Add mw-content-ltr|rtl to file redirect pages

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

Amire80 moved this task from Untriaged to RTL on the I18n board.

Thanks!