Page MenuHomePhabricator

Language/direction attributes missing from the reply/subscribe/unsubscribe links
Open, Needs TriagePublicBUG REPORT

Description

When the UI language is not the same as the page language, the "reply", "subscribe" and "unsubscribe" links are translated, but no lang/dir attributes are added to the text.

e.g. If you go to https://meta.wikimedia.org/wiki/Talk:Main_Page?uselang=de, the "reply" link will be translated to "Beantworten". If you also add a:lang(en) { background-color: pink } using the browser's developer tools, it will get a pink background, because the browser thinks the language is English.

Event Timeline

Nikki renamed this task from Language/direction attributes missing from the "reply" link to Language/direction attributes missing from the reply/subscribe/unsubscribe links.Jun 23 2023, 10:12 PM
Nikki updated the task description. (Show Details)
Tacsipacsi subscribed.

This issue is not unique to DiscussionTools, generally no mixed-language content produced by MediaWiki or extensions has proper language/directionality markup.

I'm aware it's not unique to DiscussionTools (I also made T340266 at the same time), but I made this ticket specifically for the links created by DiscussionTools because it's a separate extension.

I don't think T32238 should be a subtask of this, that seems like a separate and much harder thing to fix. The problem I'm trying to report here is that these links are part of the UI, but are not being treated as part of the UI. Things which are part of the UI should have lang/dir attributes based on the UI language, not the content language.

Without being able to get the actually used language, it’s impossible to correctly mark up anything, whether in the content area or in the page chrome. Do you want https://meta.wikimedia.org/wiki/Talk:Main_Page?uselang=dv to get lang="dv" dir="rtl"? The button texts are in English, not in Divehi.

ppelberg moved this task from Untriaged to This Fiscal Year on the Editing-team board.
ppelberg moved this task from Backlog to Triaged on the DiscussionTools board.