http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58458
Revision: 58458 Author: sergeychernyshev Date: 2009-11-03 03:30:30 +0000 (Tue, 03 Nov 2009) Log Message: ----------- Reverting back to old style of Magic words until there is a backwards-compatible solution. Modified Paths: -------------- trunk/extensions/Widgets/Widgets.i18n.php trunk/extensions/Widgets/Widgets.php Modified: trunk/extensions/Widgets/Widgets.i18n.php =================================================================== --- trunk/extensions/Widgets/Widgets.i18n.php 2009-11-03 01:32:15 UTC (rev 58457) +++ trunk/extensions/Widgets/Widgets.i18n.php 2009-11-03 03:30:30 UTC (rev 58458) @@ -4,7 +4,8 @@ * */ -require_once( dirname(__FILE__) . '/Widgets.i18n.magic.php' ); +// FIXME: Can be enabled when new style magic words are used (introduced in r52503) +// require_once( dirname(__FILE__) . '/Widgets.i18n.magic.php' ); $messages = array(); Modified: trunk/extensions/Widgets/Widgets.php =================================================================== --- trunk/extensions/Widgets/Widgets.php 2009-11-03 01:32:15 UTC (rev 58457) +++ trunk/extensions/Widgets/Widgets.php 2009-11-03 03:30:30 UTC (rev 58458) @@ -50,6 +50,17 @@ require_once( $dir . 'smarty/Smarty.class.php' ); $wgExtensionMessagesFiles['Widgets'] = $dir . 'Widgets.i18n.php'; +// Magic words handling +// FIXME: Can be disabled when new style magic words are used (introduced in r52503) +$wgHooks['LanguageGetMagic'][] = 'widgetLanguageGetMagic'; +function widgetLanguageGetMagic( &$magicWords, $langCode = 'en' ) { + switch ( $langCode ) { + default: + $magicWords['widget'] = array ( 0, 'widget' ); + } + return true; +} + // Parser function registration $wgExtensionFunctions[] = 'widgetNamespacesInit'; $wgHooks['ParserFirstCallInit'][] = 'widgetParserFunctions'; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs