Page MenuHomePhabricator

messages from skin i18n not loaded for $wgLanguageCode != en
Closed, ResolvedPublic


I have $wgLanguageCode = "de" and see a plain "<vector-more-actions>" in my gui.

Problem exists since gerrit 135413, where the message was moved to extra i18n file and a extra require_once is used to load the Vector.php and with that the entry for $wgMessagesDirs.

This all is happen in Setup.php *after* the init of global $wgContLang.
The init is using Language::factory, which calls Language::newFromCode which calls Language::getFallbacksFor. getFallbacksFor now needs the fallback list from LocalisationCache. The first call to LocalisationCache will init the cache the cache, which used the existing items from $wgMessagesDirs. The Vector part is not added, because that is done later. So the cache is build without the messages from the skins.

Actually solution: Copy the require_once to LocalSettings.php.

Version: 1.24rc
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:38 AM
bzimport set Reference to bz67318.

I still can't reproduce this after changing $wgLanguageCode a few times (maybe it depends on the kind of localisation cache used?), but your explanation makes sense I guess.

While the goal is to have these in LocalSettings (a comment above the problematic lines even says that "the require_once calls should eventually be generated by the installer and placed in LocalSettings.php"), I still have to unbreak quite a bit of code before I can do that without breaking too many other things.

I think we should just move this to the very top of Setup.php, just after $wgStyleDirectory and friends are defined. There's nothing interesting loaded between LocalSettings and Setup (this is done in WebStart.php), and this hack will hopefully die soon anyway.

For the records: Gerrit change #135413 was merged on 2014-06-21

Change 143302 had a related patch set uploaded by Bartosz Dziewoński:
Setup.php: Move hacky skin requires higher up

Change 143302 merged by jenkins-bot:
Setup.php: Move hacky skin requires higher up

Just for record: I am using on my dev machine (windows):
•[caches] main: EmptyBagOStuff, message: SqlBagOStuff, parser: SqlBagOStuff
•[caches] LocalisationCache: using store LCStoreDB

Works after updating to you change. Thanks.