Page MenuHomePhabricator

lang and dir attributes are not applied to rendered Abstract Wikipedia preview
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:

A Hebrew sentence is shown. It's aligned to the left, and the full top is on the right-hand end of the sentence.

צילום מסך מ־2026-03-19 22-42-23.png (632×968 px, 61 KB)

What should have happened instead?:

When a Hebrew sentence is shown, it must be aligned to the right, and the full stop must be on the left-hand end of the sentence.

The easy way to do this is probably to apply the appropriate lang and dir attributes to the HTML element with the content in the target language. It probably makes sense to apply those attributes to that element on the initial load of the page, even if they are the same as the same attributes on parent elements (<html>, <div id="contentSub">, etc.)

Event Timeline

gengh renamed this task from lang and he attributes are not applied to rendered Abstract Wikipedia preview to lang and dir attributes are not applied to rendered Abstract Wikipedia preview.Mar 24 2026, 12:36 PM
gengh claimed this task.
Jdforrester-WMF changed the task status from Open to In Progress.Mar 24 2026, 2:20 PM
Jdforrester-WMF triaged this task as High priority.

Change #1259987 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] AbstractPreview: apply selected preview language lang/dir to abstract preview body

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

Change #1259987 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] AbstractPreview: apply selected preview language lang/dir to abstract preview body

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

Change #1259994 had a related patch set uploaded (by Jforrester; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@wmf/1.46.0-wmf.21] AbstractPreview: apply selected preview language lang/dir to abstract preview body

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

Change #1259994 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.46.0-wmf.21] AbstractPreview: apply selected preview language lang/dir to abstract preview body

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

Mentioned in SAL (#wikimedia-operations) [2026-03-24T20:20:15Z] <jforrester@deploy2002> Started scap sync-world: Backport for [[gerrit:1259967|Set json object before setting Abstract Wiki Id (T420916)]], [[gerrit:1259994|AbstractPreview: apply selected preview language lang/dir to abstract preview body (T420687)]], [[gerrit:1260092|AbstractTitle: Handle pageinfo responses without normalized titles (T420725)]], [[gerrit:1259992|[abstractwiki] Don't list abstract as a langlist entry

Mentioned in SAL (#wikimedia-operations) [2026-03-24T20:22:33Z] <jforrester@deploy2002> jforrester: Backport for [[gerrit:1259967|Set json object before setting Abstract Wiki Id (T420916)]], [[gerrit:1259994|AbstractPreview: apply selected preview language lang/dir to abstract preview body (T420687)]], [[gerrit:1260092|AbstractTitle: Handle pageinfo responses without normalized titles (T420725)]], [[gerrit:1259992|[abstractwiki] Don't list abstract as a langlist entry (T420654)]] s

Deployed to wmf.21, which abstract.wikipedia.org will move to tomorrow morning.

Mentioned in SAL (#wikimedia-operations) [2026-03-24T20:27:26Z] <jforrester@deploy2002> Finished scap sync-world: Backport for [[gerrit:1259967|Set json object before setting Abstract Wiki Id (T420916)]], [[gerrit:1259994|AbstractPreview: apply selected preview language lang/dir to abstract preview body (T420687)]], [[gerrit:1260092|AbstractTitle: Handle pageinfo responses without normalized titles (T420725)]], [[gerrit:1259992|[abstractwiki] Don't list abstract as a langlist entry

OK, this is fixed for the content lang/dir in the DOM, but we don't refresh the title correctly. Will follow that up in a different patch.