Page MenuHomePhabricator

Reconsider the value of getPageLanguage() and getPageViewLanguage() for redirect pages
Closed, ResolvedPublic

Description

Appearance: https://kk.wikipedia.org/w/index.php?title=Caltha&variant=kk-arab&redirect=no has a wrong arrow direction (compare https://ar.wikipedia.org/w/index.php?title=%D8%B1%D9%8A%D8%A7%D8%B6%D9%8A%D8%A7%D8%AA_%D9%85%D8%AD%D8%AF%D8%AF%D8%A9&redirect=no )

Reason: Article::viewRedirect() uses page language (= kk) to render the arrow, while OutputPage uses page view language (= kk-arab from &variant= URL param) to wrap it in <div lang=" " dir=" "> which mismatch.

Fix: gerrit 63378 is changing Article::viewRedirect() to use page view language, so that problematic page will display a RTL arrow, with the hole content block rendered RTL, which don't contradict with each other.

Problem: The only content on that page is "Греффей", which is a LTR word. Why do we put it in a page with RTL layout?

Potential solution: Given the only contents on redirect pages are redirect targets, should the (view) language of redirects be defined as the language of redirect target pages (or at least, the language of target titles)?


Version: 1.22.0
Severity: normal

Details

Reference
bz50469