Page MenuHomePhabricator

Use extension registration (extension.json/skin.json) for preloaded i18n messages
Open, Stalled, MediumPublic

Description

Currently, the core defined a list of preloaded i18n messages in MessagesEn.php, which also includes 3 messages from vector (MessagesEn.php#661).

Follow up to T349115, we should allow extensions and skins to define their frequently-used messages that should be preloaded, and not include them in the core.

This list doesn't need to be varied by language, so using extension registration (extension.json/skin.json) would be good.

Event Timeline

Change #1032741 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Use extension registration for preloaded i18n messages

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

Change #1032742 had a related patch set uploaded (by Func; author: Func):

[mediawiki/skins/Vector@master] Use skin.json for preloaded i18n messages

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

Jdlrobson subscribed.

FWIW We need some more background on why these messages were selected in the first case. They seem to have been selected for legacy Vector, but may not make sense for modern Vector. In many ways rather than doing this, it might make sense to instead audit Vector's messages first and work out which need to be preloaded.
This aside, the core change should likely be prioritized by the MediaWiki platform team first.

FWIW We need some more background on why these messages were selected in the first case.

I introduced this feature and initially populated the list with messages that were loaded on a local page view. Git blame shows most of the lines still trace to my initial commit in 2009. It improves page view performance but is probably counterproductive for other kinds of requests.

They seem to have been selected for legacy Vector, but may not make sense for modern Vector. In many ways rather than doing this, it might make sense to instead audit Vector's messages first and work out which need to be preloaded.

I updated the list in 2012, and Umherirrender updated it in 2014. It does need to be updated periodically to be effective.

Ack! I assume we should add any messages that show up on https://en.wikipedia.org/wiki/Nicholas_of_Worcester?uselang=qqx for an anonymous page view? If so it looks like it would make sense to change this quite signfiicantly e.g. add vector-no-language-button-label, pt-createaccount, pt-login etc..

Do legacy Vector messages even need to be specified now legacy Vector is no longer the default skin?