Page MenuHomePhabricator

Remove $wgContLanguageCode
Closed, ResolvedPublic

Description

Prior to 2004, the site language was configured via $wgContLanguageCode, derived from that were $wgContLang (object). $wgLanguageCode was just a cached copy of $wgUser->getOption('language').

In 2004 (r5492, 5537c5b85e, MW 1.3), $wgContLanguageCode ceased to be supported as a configuration variable. Instead, the site language would now be configured via $wgLanguageCode instead and the confusion started. Its value was copied to $wgContLanguageCode for back-compat, and also because $wgLanguageCode was still also used to store User::getOption('language') right after initialising $wgContLang.

Sometime between 2004 and 2006, $wgLanguageCode was relieved of this secondary purpose, as documented in r5492 (5537c5b85, MW 1.8), leaving it as just a configuration variable for the site language.

Let's remove any uses of it and then remove it from Setup.php.

Event Timeline

Change 579774 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Math@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579775 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/FlaggedRevs@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579776 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CiteThisPage@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579777 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/DoubleWiki@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579778 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/SiteSettings@master] Remove outdated use of $wgContLanguageCode

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

Change 579780 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] cache: Remove use of $wgContLanguageCode in MessageCacheTest

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

Change 579781 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] Remove $wgContLanguageCode

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

Change 579778 merged by jenkins-bot:
[mediawiki/extensions/SiteSettings@master] Remove outdated use of $wgContLanguageCode

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

Change 579775 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579777 merged by jenkins-bot:
[mediawiki/extensions/DoubleWiki@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579776 merged by jenkins-bot:
[mediawiki/extensions/CiteThisPage@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579780 merged by jenkins-bot:
[mediawiki/core@master] cache: Remove use of $wgContLanguageCode in MessageCacheTest

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

Change 579774 merged by Krinkle:
[mediawiki/extensions/Math@master] Replace $wgContLanguageCode with $wgLanguageCode

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

Change 579781 merged by jenkins-bot:
[mediawiki/core@master] Remove $wgContLanguageCode

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

@Jdforrester-WMF: Removing Projects-Cleanup as that is for repositories - Technical-Debt might apply?

"An umbrella project for tracking efforts to clean and/or reorganize Phabricator tasks and projects."

Should probably be renamed to "Phabricator-clean-up" or similar then.