Page MenuHomePhabricator

Language for the element mw-content-text is content language instead of page content language when $wgPageLanguageUseDB = true
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Set $wgPageLanguageUseDB = true in LocalSettings.php
  • Set content language of the wiki $wgLanguageCode = "nl" in LocalSettings.php.
  • Create a new article with the title Foobar.
  • Change the page content language for this article from nl to fr via Special:PageLanguage/Foobar
  • Load http://localhost/w/index.php?title=Foobar&uselang=de

Current result: The HTML contains:

<div id="mw-content-text" lang="nl" dir="ltr" class="mw-content-ltr">

Expected result: The HTML should contain:

<div id="mw-content-text" lang="fr" dir="ltr" class="mw-content-ltr">

The global JavaScript variable wgPageContentLanguage correct contains fr.

Event Timeline

Fomafix raised the priority of this task from to Needs Triage.
Fomafix updated the task description. (Show Details)
Fomafix added a subscriber: Fomafix.
Fomafix triaged this task as Medium priority.Nov 4 2015, 2:20 PM

Change 250966 had a related patch set uploaded (by Gerrit Patch Uploader):
Title.php: Support DB language in getPageViewLanguage()

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

Change 250966 merged by jenkins-bot:
Title.php: Support DB language in getPageViewLanguage()

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