Page MenuHomePhabricator

donationinterface_langonly removal from WMF cluster/CommonSettings.php
Closed, ResolvedPublic1 Estimated Story Points

Description

donationinterface_langonly.php exists to load various i18n files... But when donationainterface is listed in https://noc.wikimedia.org/conf/highlight.php?file=extension-list the message files are actually loaded into the l10n cache that is built

So, do we need these lines in CommonSettings anymore? And similarly, can the file be removed from the extension itself

if ( $wmgDonationInterface ) {
	// Regular DonationInterface should not be enabled on the WMF cluster.
	// So, only load i18n files for DonationInterface -awjrichards 1 November 2011
	require_once( "$IP/extensions/DonationInterface/donationinterface_langonly.php" );
}

Event Timeline

Reedy created this task.Feb 27 2017, 12:22 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 27 2017, 12:22 AM
awight added a subscriber: awight.Feb 28 2017, 10:18 PM

@Reedy
Thanks for pointing this out! I think you're right that we can remove the langonly file, but now I'm curious whether we can avoid pulling in all the other garbage from DonationInterface such as top-level namespaced classes?

awight triaged this task as Medium priority.Feb 28 2017, 10:18 PM
awight set the point value for this task to 1.

@Reedy
Thanks for pointing this out! I think you're right that we can remove the langonly file, but now I'm curious whether we can avoid pulling in all the other garbage from DonationInterface such as top-level namespaced classes?

What is the point of the file? Is it just to have the messages available on most WMF wikis? If so, the fact it exists in extension-list will merge in all the message lists etc. Or is there something that I'm being blind and missing? :)

The only extra I can see that file adds is a Special:Version entry

@Reedy
Agreed that the langonly file is bogus, but by including DonationInterface in extension-list, aren't we causing the entire extension.json to be loaded on production wikis?

If so, it's a bit unfortunate, cos we really don't need any of the configuration, resource modules, classes, and especially special pages.

Maybe I'm missing something, and we are not loading the extension.json?

@Reedy
Agreed that the langonly file is bogus, but by including DonationInterface in extension-list, aren't we causing the entire extension.json to be loaded on production wikis?

If so, it's a bit unfortunate, cos we really don't need any of the configuration, resource modules, classes, and especially special pages.

Maybe I'm missing something, and we are not loading the extension.json?

Nope, extension-list is only used i18n/l10n cache building purposes. It enumerates all the files in extension-list, looking for wgMessagesDirs (well, MessagesDirs in extension.json land), to make them into single language l10n cdb files

I'm not sure if aliases etc are loaded, but if we're not using the Special Pages, this shouldn't matter

ooh wonderful. Okay thanks, I'll chop that code out, then.

Change 340421 had a related patch set uploaded (by Awight):
[operations/mediawiki-config] Deprecate DonationInterface i18n messages

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

Change 340422 had a related patch set uploaded (by Awight):
[mediawiki/extensions/DonationInterface] Remove deprecated langonly file for loading i18n messages on donatewiki

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

Change 340422 merged by jenkins-bot:
Remove deprecated langonly file for loading i18n messages on donatewiki

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

Change 340421 merged by jenkins-bot:
Deprecate DonationInterface i18n messages

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

awight closed this task as Resolved.Mar 2 2017, 12:06 AM
mmodell removed a subscriber: awight.Jun 22 2017, 9:44 PM