Hi!
wfMsg and wfMsgForContent are deprecated since 1.18 but the comment doesn't say what functions are recommended to use instead. Does anyone knows? ----- Yury Katkov, WikiVote
See https://www.mediawiki.org/wiki/Manual:Messages_API#Deprecated_wfMsg.2A_funct...
Alex Monk
On 19/02/13 17:07, Yury Katkov wrote:
Hi!
wfMsg and wfMsgForContent are deprecated since 1.18 but the comment doesn't say what functions are recommended to use instead. Does anyone knows?
Yury Katkov, WikiVote
Hey,
Do try to use local context when available though. wfMessage uses global state. If you have a context object available, you can use its msg method. Would be nice if there was a clean and properly segregated interface for message handling objects, though there is none AFAIK.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Thanks, that helps!
Maybe it would be good to add the replacement function to the comments in the code? The documentation for doxygen [1] says that @deprecated can be use for describing alternatives. I think it's important for extension developers to quickly see what's not deprecated way to do things. [1] http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddeprecated ----- Yury Katkov, WikiVote
On Tue, Feb 19, 2013 at 9:10 PM, Krenair krenair@gmail.com wrote:
See https://www.mediawiki.org/wiki/Manual:Messages_API#Deprecated_wfMsg.2A_funct...
Alex Monk
On 19/02/13 17:07, Yury Katkov wrote:
Hi!
wfMsg and wfMsgForContent are deprecated since 1.18 but the comment doesn't say what functions are recommended to use instead. Does anyone knows?
Yury Katkov, WikiVote
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Le 19/02/13 18:44, Yury Katkov a écrit :
Maybe it would be good to add the replacement function to the comments in the code? The documentation for doxygen [1] says that @deprecated can be use for describing alternatives. I think it's important for extension developers to quickly see what's not deprecated way to do things.
Even better, we could use a new deprecation function that will accept an optional helpful message listing the replacement for the call. Of course we will have to mark wfDeprecated() as deprecated :-D
On 19 February 2013 19:10, Krenair krenair@gmail.com wrote:
See https://www.mediawiki.org/wiki/Manual:Messages_API#Deprecated_wfMsg.2A_funct...
The whole page is a recommended reading. I refactored it about a week ago to make it more accessible. Thank you to everyone who has already provided feedback or cleaned up after my mistakes.
-Niklas
wikitech-l@lists.wikimedia.org