Page MenuHomePhabricator

Parsoid localization string should add explicit lang and direction markers to wrappers
Closed, ResolvedPublicBUG REPORT

Description

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

Compare
https://fa.wikipedia.org/wiki/%D9%87%D9%88%D9%86%D8%AF%D8%A7_%D8%B3%DB%8C%E2%80%8C%D8%A8%DB%8C%DB%B7%DB%B7?useparsoid=1&uselang=fa

image.png (313×609 px, 75 KB)

and
https://fa.wikipedia.org/wiki/%D9%87%D9%88%D9%86%D8%AF%D8%A7_%D8%B3%DB%8C%E2%80%8C%D8%A8%DB%8C%DB%B7%DB%B7?useparsoid=0&uselang=fa
image.png (162×642 px, 46 KB)

What happens?:

The error message on the Parsoid version is not flowing in the right direction.

What should have happened instead?:

Both error messages should flow in the same (correct) direction).

Note

The legacy parser adds a lang="fa" dir="rtl" on the message wrapper, which the Parsoid localization pass does not do. And, since the reference block itself is marked as "ltr", this messes up the error message display in this case.
Adding the correct information to the wrapper should fix the issue, or at least make it equivalent to issues that would arise in legacy parsing as well (I don't believe that the <ref> tag in that message should be displayed as ref>>!)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1199829 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] ParsoidLocalization: add lang/dir to localized dir/spans

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

Change #1199829 merged by jenkins-bot:

[mediawiki/core@master] ParsoidLocalization: add lang/dir to localized dir/spans

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