Now that $wgMessageCache is obsolete in 1.18.0, what is the approved way for an
extension to add a system message dynamically at runtime?
That is, what is the new way to do $wgMessageCache-addMessage(a, b)?
http://www.mediawiki.org/wiki/Manual:$wgMessageCache does not say.
Thanks,
DanB
On 07/12/11 06:38, Daniel Barrett wrote:
Now that $wgMessageCache is obsolete in 1.18.0, what is the
approved way for an extension to add a system message dynamically
at runtime?
That is, what is the new way to do $wgMessageCache-addMessage(a,
b)?
There's no precise equivalent.
You can
On 07/12/11 09:52, Daniel Barrett wrote:
Tim Starling writes:
You can add or modify messages when the cache is built by
hooking LocalisationCacheRecache, and you can add a cache
dependency to trigger a rebuild by adding elements to
$allData['deps'].
Thanks. Do I need to do both, or is
Tim Starling writes:
You should have a look at how tracking categories work in the core,
see Parser::addTrackingCategory().
Ooo, shiny! Thanks for the great tip.
Is there any way to use addTrackingCategory (or similar) if the category name
must be computed at runtime, not a piece of static
On 07/12/11 12:32, Daniel Barrett wrote:
A variant $parser-addTrackingCategory($msg, $args...) would work
great if it existed.
Parser::addTrackingCategory() is protected, so you will have to
duplicate it before you can use it in your extension. It only calls
public functions, so it is possible