Index: trunk/extensions/FlaggedRevs/frontend/language/FlaggedRevs.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'pagesusingpendingchanges' => array( 0, 'pagesusingpendingchanges' ), |
| 11 | + 'pagesusingpendingchanges' => array( 0, 'pendingchangelevel' ), |
| 12 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/FlaggedRevs/frontend/language/FlaggedRevs.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php |
— | — | @@ -229,12 +229,6 @@ |
230 | 230 | return true; |
231 | 231 | } |
232 | 232 | |
233 | | - public static function onLanguageGetMagic( &$magicWords, $langCode ) { |
234 | | - $magicWords['pagesusingpendingchanges'] = array( 0, 'pagesusingpendingchanges' ); |
235 | | - $magicWords['pendingchangelevel'] = array( 0, 'pendingchangelevel' ); |
236 | | - return true; |
237 | | - } |
238 | | - |
239 | 233 | public static function onParserGetVariableValueSwitch( &$parser, &$cache, &$word, &$ret ) { |
240 | 234 | if ( $word == 'pendingchangelevel' ) { |
241 | 235 | $title = $parser->getTitle(); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.setup.php |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | ### Presentation classes ### |
83 | 83 | # Main i18n file and special page alias file |
84 | 84 | $messagesFiles['FlaggedRevs'] = "$langDir/FlaggedRevs.i18n.php"; |
| 85 | + $messagesFiles['FlaggedRevsMagic'] = "$langDir/FlaggedRevs.i18n.magic.php"; |
85 | 86 | $messagesFiles['FlaggedRevsAliases'] = "$langDir/FlaggedRevs.alias.php"; |
86 | 87 | # UI setup, forms, and HTML elements |
87 | 88 | $classes['FlaggedRevsUISetup'] = "$frontendDir/FlaggedRevsUI.setup.php"; |
— | — | @@ -246,8 +247,6 @@ |
247 | 248 | if ( $wgFlaggedRevsProtection ) { |
248 | 249 | # Add pending changes related magic words |
249 | 250 | $wgHooks['ParserFirstCallInit'][] = 'FlaggedRevsHooks::onParserFirstCallInit'; |
250 | | - // @todo FIXME: Use $wgExtensionMessagesFiles instead of LanguageGetMagic hook. |
251 | | - $wgHooks['LanguageGetMagic'][] = 'FlaggedRevsHooks::onLanguageGetMagic'; |
252 | 251 | $wgHooks['ParserGetVariableValueSwitch'][] = 'FlaggedRevsHooks::onParserGetVariableValueSwitch'; |
253 | 252 | $wgHooks['MagicWordwgVariableIDs'][] = 'FlaggedRevsHooks::onMagicWordwgVariableIDs'; |
254 | 253 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -23,6 +23,9 @@ |
24 | 24 | // Register special page aliases file |
25 | 25 | $wgExtensionMessagesFiles['MetavidWikiAlias'] = $mvgIP . '/languages/MV_Aliases.php'; |
26 | 26 | |
| 27 | +// Register magic words |
| 28 | +$wgExtensionMessagesFiles['MetavidWikiMagic'] = $mvgIP . '/languages/MV_Magic.php'; |
| 29 | + |
27 | 30 | $markerList = array(); |
28 | 31 | $mvGlobalJSVariables = array(); |
29 | 32 | // override special search page: |
— | — | @@ -230,12 +233,6 @@ |
231 | 234 | $wgAutoloadClasses['mvOggHandler'] = dirname( __FILE__ ) . '/MV_OggHandler.php'; |
232 | 235 | $wgMediaHandlers['application/ogg']='mvOggHandler'; |
233 | 236 | $wgParserOutputHooks['OggHandler'] = array( 'mvOggHandler', 'outputHook' ); |
234 | | - // @todo FIXME: LanguageGetMagic is deprecated. Need to find another solution. |
235 | | - foreach($wgHooks['LanguageGetMagic'] as & $hook_function){ |
236 | | - if($hook_function=='OggHandler::registerMagicWords'){ |
237 | | - $hook_function='mvOggHandler::registerMagicWords'; |
238 | | - } |
239 | | - } |
240 | 237 | foreach($wgExtensionCredits as & $ext){ |
241 | 238 | if(isset($ext['name'])){ |
242 | 239 | if($ext['name']=='OggHandler'){ |
— | — | @@ -267,17 +264,7 @@ |
268 | 265 | 'descriptionmsg' => 'mv-desc', |
269 | 266 | ); |
270 | 267 | } |
271 | | -# Define a setup function |
272 | | -// @todo FIXME LanguageGetMagic is deprecated. Need to find another solution. |
273 | | -# Add a hook to initialize the magic word |
274 | | -$wgHooks['LanguageGetMagic'][] = 'mvMagicParserFunction_Magic'; |
275 | 268 | |
276 | | -function mvMagicParserFunction_Magic( &$magicWords, $langCode ) { |
277 | | - $magicWords['mvData'] = array( 0, 'mvData' ); |
278 | | - $magicWords['mvEmbed'] = array( 0, 'mvEmbed' ); |
279 | | - return true; |
280 | | -} |
281 | | - |
282 | 269 | function mvMagicParserFunction_Render( &$parser ) { |
283 | 270 | // gennerate arg_list array without parser param |
284 | 271 | $arg_list = array_slice( func_get_args(), 1 ); |
Index: trunk/extensions/MetavidWiki/languages/MV_Magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'mvData' => array( 0, 'mvData' ), |
| 11 | + 'mvEmbed' => array( 0, 'mvEmbed' ), |
| 12 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/MetavidWiki/languages/MV_Magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |