http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54874
Revision: 54874 Author: siebrand Date: 2009-08-12 15:42:24 +0000 (Wed, 12 Aug 2009) Log Message: ----------- * inactive new style magic words support for SemanticResultFormats - dev. wants trunk to be backward compat up to supported MediaWiki (1.13) * add localisation support for SemanticResultFormats magic in Translate Modified Paths: -------------- trunk/extensions/SemanticResultFormats/SRF_Messages.php trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php trunk/extensions/SemanticResultFormats/SRF_Settings.php trunk/extensions/Translate/groups/mediawiki-defines.txt Added Paths: ----------- trunk/extensions/SemanticResultFormats/SRF_Magic.php Added: trunk/extensions/SemanticResultFormats/SRF_Magic.php =================================================================== --- trunk/extensions/SemanticResultFormats/SRF_Magic.php (rev 0) +++ trunk/extensions/SemanticResultFormats/SRF_Magic.php 2009-08-12 15:42:24 UTC (rev 54874) @@ -0,0 +1,8 @@ +<?php + +$magicWords = array(); + +$magicWords['en'] = array( + 'calendarstartdate' => array( 0, 'calendarstartdate' ), + 'calendarenddate' => array( 0, 'calendarenddate' ) +); Property changes on: trunk/extensions/SemanticResultFormats/SRF_Magic.php ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: trunk/extensions/SemanticResultFormats/SRF_Messages.php =================================================================== --- trunk/extensions/SemanticResultFormats/SRF_Messages.php 2009-08-12 15:37:36 UTC (rev 54873) +++ trunk/extensions/SemanticResultFormats/SRF_Messages.php 2009-08-12 15:42:24 UTC (rev 54874) @@ -5,6 +5,9 @@ * @addtogroup Extensions */ +// FIXME: Can be enabled when new style magic words are used (introduced in r52503) +// require_once( dirname( __FILE__ ) . '/SRF_Magic.php' ); + $messages = array(); /** English Modified: trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php =================================================================== --- trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php 2009-08-12 15:37:36 UTC (rev 54873) +++ trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php 2009-08-12 15:42:24 UTC (rev 54874) @@ -26,6 +26,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: Modified: trunk/extensions/SemanticResultFormats/SRF_Settings.php =================================================================== --- trunk/extensions/SemanticResultFormats/SRF_Settings.php 2009-08-12 15:37:36 UTC (rev 54873) +++ trunk/extensions/SemanticResultFormats/SRF_Settings.php 2009-08-12 15:42:24 UTC (rev 54874) @@ -18,6 +18,7 @@ $wgAutoloadClasses['SRFParserFunctions'] = $srfgIP . '/SRF_ParserFunctions.php'; +// FIXME: Can be removed when new style magic words are used (introduced in r52503) $wgHooks['LanguageGetMagic'][] = 'SRFParserFunctions::languageGetMagic'; $wgHooks['AdminLinks'][] = 'srffAddToAdminLinks'; $wgExtensionFunctions[] = 'srffRegisterFunctions'; Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt =================================================================== --- trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 15:37:36 UTC (rev 54873) +++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2009-08-12 15:42:24 UTC (rev 54874) @@ -851,6 +851,7 @@ Semantic Result Formats file = SemanticResultFormats/SRF_Messages.php +magicfile = SemanticResultFormats/SRF_Magic.php descmsg = srf-desc optional = srf_icalendar_link, srf_vcard_link, srf_bibtex_link _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs