http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54856
Revision: 54856 Author: siebrand Date: 2009-08-12 14:14:38 +0000 (Wed, 12 Aug 2009) Log Message: ----------- * new style magic words support for Widgets * add localisation support for Widgets magic in Translate * minor formatting updates * bump version Modified Paths: -------------- trunk/extensions/Translate/groups/mediawiki-defines.txt trunk/extensions/Widgets/Widgets.i18n.php trunk/extensions/Widgets/Widgets.php Added Paths: ----------- trunk/extensions/Widgets/Widgets.i18n.magic.php Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt =================================================================== --- trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 14:14:12 UTC (rev 54855) +++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 14:14:38 UTC (rev 54856) @@ -1181,6 +1181,7 @@ aliasfile = WhoIsWatching/SpecialWhoIsWatching.alias.php Widgets +magicfile = Widgets/Widgets.i18n.magic.php Wiki Article Feeds Added: trunk/extensions/Widgets/Widgets.i18n.magic.php =================================================================== --- trunk/extensions/Widgets/Widgets.i18n.magic.php (rev 0) +++ trunk/extensions/Widgets/Widgets.i18n.magic.php 2009-08-12 14:14:38 UTC (rev 54856) @@ -0,0 +1,7 @@ +<?php + +$magicWords = array(); + +$magicWords['en'] = array( + 'widget' => array( 0, 'widget' ), +); Property changes on: trunk/extensions/Widgets/Widgets.i18n.magic.php ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: trunk/extensions/Widgets/Widgets.i18n.php =================================================================== --- trunk/extensions/Widgets/Widgets.i18n.php 2009-08-12 14:14:12 UTC (rev 54855) +++ trunk/extensions/Widgets/Widgets.i18n.php 2009-08-12 14:14:38 UTC (rev 54856) @@ -4,6 +4,8 @@ * */ +require_once( dirname(__FILE__) . '/Widgets.i18n.magic.php' ); + $messages = array(); $messages['en'] = array( Modified: trunk/extensions/Widgets/Widgets.php =================================================================== --- trunk/extensions/Widgets/Widgets.php 2009-08-12 14:14:12 UTC (rev 54855) +++ trunk/extensions/Widgets/Widgets.php 2009-08-12 14:14:38 UTC (rev 54856) @@ -17,7 +17,7 @@ 'name' => 'Widgets', 'description' => 'Allows wiki administrators to add free-form widgets to wiki by just editing pages within Widget namespace. Originally developed for [http://www.ardorado.com Ardorado.com]', 'descriptionmsg' => 'widgets-desc', - 'version' => '0.8.8-dev', + 'version' => '0.9.0-dev', 'author' => '[http://www.sergeychernyshev.com Sergey Chernyshev] (for [http://www.semanticcommunities.com Semantic Communities LLC.])', 'url' => 'http://www.mediawiki.org/wiki/Extension:Widgets' ); @@ -52,7 +52,6 @@ // Parser function registration $wgExtensionFunctions[] = 'widgetNamespacesInit'; -$wgHooks['LanguageGetMagic'][] = 'widgetLanguageGetMagic'; $wgHooks['ParserFirstCallInit'][] = 'widgetParserFunctions'; function widgetParserFunctions( &$parser ) { @@ -61,14 +60,6 @@ return true; } -function widgetLanguageGetMagic( &$magicWords, $langCode = 'en' ) { - switch ( $langCode ) { - default: - $magicWords['widget'] = array ( 0, 'widget' ); - } - return true; -} - function renderWidget ( &$parser, $widgetName ) { global $IP; @@ -221,11 +212,10 @@ } function wiki_get_secure( $tpl_name, &$smarty_obj ) { - // assume all templates are secure - return true; + // assume all templates are secure + return true; } function wiki_get_trusted( $tpl_name, &$smarty_obj ) { - // not used for templates + // not used for templates } - _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs