jenkins-bot has submitted this change and it was merged.

Change subject: OutputPage: Use PageViewLanguage instead of PageLanguage for 
mw.config
......................................................................


OutputPage: Use PageViewLanguage instead of PageLanguage for mw.config

This way wgPageContentLanguage will be the language of the displayed
page content and not the language of the page as stored in the database.

Affects other mw.config values as well:
* wgPageContentLanguage
* wgDefaultDateFormat
* wgMonthNames
* wgMonthNamesShort
* wgSeparatorTransformTable
* wgDigitTransformTable

It does not change anything for most of kind of pages, expect for pages
with special Content types like Wikibase entities that outputs the
content of the page in the user language but store the page in a
multilingual way. It fix the case that such entities have ever
wgPageContentLanguage=en even if the page is fully displayed, as example,
in French.

Change-Id: Ib2073071b5d46eaf9cbd1d09ac92a842a0ef4233
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  Daniel Kinzler: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index f5dbfc6..ab272ba 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3015,7 +3015,7 @@
                        $articleId = $wikiPage->getId();
                }
 
-               $lang = $title->getPageLanguage();
+               $lang = $title->getPageViewLanguage();
 
                // Pre-process information
                $separatorTransTable = $lang->separatorTransformTable();

-- 
To view, visit https://gerrit.wikimedia.org/r/88478
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2073071b5d46eaf9cbd1d09ac92a842a0ef4233
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tpt <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to