robchurch(a)svn.wikimedia.org wrote:
Revision: 18446
Author: robchurch
Date: 2006-12-19 05:42:35 -0800 (Tue, 19 Dec 2006)
- $wgOut->addWikiText( wfMsgForContent( "recentchangestext" ) );
+ $wgOut->addWikiText( wfMsgForContentNoTrans( "recentchangestext" ) );
Is there actually any proper documentation explaining which wfMsg*()
functions to use with which OutputPage methods for various purposes? I
count 13 wfMsg*() functions (of which wfMsgExt() has 16 possible major
variants) and 8 or 9 relevant OutputPage methods. This seems like a
recipe for disaster, and the change I quoted (as well as r18444) just
confirms my suspicion that several of the combinations I've seen in the
live code are just plain broken.
The problem is that most of the default messages just contain plain text
with no template calls or other oddities, which means that such bugs
will go unnoticed until someone tries to customize the interface. The
fact that many of the functions involved have names that are both long
and uninformative at the same time, and the fact that the documentation
comments for them are patchy at best, makes it worse.
I've half a mind to rewrite the whole mess, but of course we'd still
have to keep the old functions for extension compatibility even if we
deprecated them.
--
Ilmari Karonen