Page MenuHomePhabricator

Message class ignores $wgForceUIMsgAsContentMsg
Closed, ResolvedPublic

Description

wfMessage('mainpage')->inContentLanguage() always gives the content language, even if it is overrriden by $wgForceUIMsgAsContentMsg

php maintenance/eval.php

$wgContLang = Language::factory('en');
$wgLang = Language::factory('fr');
$wgForceUIMsgAsContentMsg[] = 'mainpage';
echo wfMsgForContent('mainpage');

Accueil

echo wfMessage('mainpage')->inContentLanguage()->text();

Main Page


Version: 1.17.x
Severity: normal

Details

Reference
bz29274

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:25 PM
bzimport set Reference to bz29274.
bzimport added a subscriber: Unknown Object (MLST).

Is this a regression from 1.16 ?

(In reply to comment #1)

I can fix this.

Awesome.

(In reply to comment #2)

Is this a regression from 1.16 ?

Depends on if those kind of calls have been converted a lot.

Great, thanks Niklas.

Krinkle, it was a regression for places that used WfMsgForContent and were changed to use wfMessage()->inContentLanguage().