http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54866
Revision: 54866 Author: siebrand Date: 2009-08-12 15:09:02 +0000 (Wed, 12 Aug 2009) Log Message: ----------- * inactive new style magic words support for SemanticForms - dev. wants trunk to be backward compat up to supported MediaWiki (1.13) * add localisation support for SemanticForms magic in Translate Modified Paths: -------------- trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php trunk/extensions/SemanticForms/languages/SF_Messages.php trunk/extensions/Translate/groups/mediawiki-defines.txt Added Paths: ----------- trunk/extensions/SemanticForms/languages/SF_Magic.php Modified: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php =================================================================== --- trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php 2009-08-12 15:00:58 UTC (rev 54865) +++ trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php 2009-08-12 15:09:02 UTC (rev 54866) @@ -27,6 +27,7 @@ $wgExtensionFunctions[] = 'sfgSetupExtension'; $wgExtensionFunctions[] = 'sfgParserFunctions'; +// FIXME: Can be removed when new style magic words are used (introduced in r52503) $wgHooks['LanguageGetMagic'][] = 'SFParserFunctions::languageGetMagic'; // the 'BrokenLink' hook exists only in MediaWiki v1.13 - it was replaced // by 'LinkBegin' and 'LinkEnd' Modified: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php =================================================================== --- trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php 2009-08-12 15:00:58 UTC (rev 54865) +++ trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php 2009-08-12 15:09:02 UTC (rev 54866) @@ -107,6 +107,7 @@ return true; } + // FIXME: Can be removed when new style magic words are used (introduced in r52503) static function languageGetMagic( &$magicWords, $langCode = "en" ) { switch ( $langCode ) { default: Added: trunk/extensions/SemanticForms/languages/SF_Magic.php =================================================================== --- trunk/extensions/SemanticForms/languages/SF_Magic.php (rev 0) +++ trunk/extensions/SemanticForms/languages/SF_Magic.php 2009-08-12 15:09:02 UTC (rev 54866) @@ -0,0 +1,10 @@ +<?php + +$magicWords = array(); + +$magicWords['en' => array( + 'forminput' => array ( 0, 'forminput' ), + 'formlink' => array ( 0, 'formlink' ), + 'arraymap' => array ( 0, 'arraymap' ), + 'arraymaptemplate' => array ( 0, 'arraymaptemplate' ) +); Property changes on: trunk/extensions/SemanticForms/languages/SF_Magic.php ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: trunk/extensions/SemanticForms/languages/SF_Messages.php =================================================================== --- trunk/extensions/SemanticForms/languages/SF_Messages.php 2009-08-12 15:00:58 UTC (rev 54865) +++ trunk/extensions/SemanticForms/languages/SF_Messages.php 2009-08-12 15:09:02 UTC (rev 54866) @@ -5,6 +5,9 @@ * @addtogroup Extensions */ +// FIXME: Can be enabled when new style magic words are used (introduced in r52503) +// require_once( dirname( __FILE__ ) . '/SF_Magic.php' ); + $messages = array(); /** English Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt =================================================================== --- trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 15:00:58 UTC (rev 54865) +++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 15:09:02 UTC (rev 54866) @@ -826,6 +826,7 @@ Semantic Forms file = SemanticForms/languages/SF_Messages.php aliasfile = SemanticForms/languages/SF_Aliases.php +magicfile = SemanticForms/languages/SF_Magic.php Semantic Gallery _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs