Index: trunk/extensions/MathStatFunctions/MathStatFunctions.i18n.magic.php |
— | — | @@ -1,12 +1,11 @@ |
2 | 2 | <?php |
| 3 | +/** |
| 4 | + * Magic word localization for the MathStatFunction extension |
| 5 | +*/ |
3 | 6 | |
4 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
5 | | - die( 'This file is a MediaWiki extension, it is not a valid entry point' ); |
6 | | -} |
| 7 | +$magicWords = array(); |
7 | 8 | |
8 | | -$wgMathStatFunctionsMagic = array(); |
9 | | - |
10 | | -$wgMathStatFunctionsMagic['en'] = array( |
| 9 | +$magicWords['en'] = array( |
11 | 10 | 'const' => array( 0, 'const' ), |
12 | 11 | 'median' => array( 0, 'median' ), |
13 | 12 | 'mean' => array( 0, 'mean' ), |
Index: trunk/extensions/MathStatFunctions/MathStatFunctions.i18n.php |
— | — | @@ -5,6 +5,8 @@ |
6 | 6 | * @addtogroup Extensions |
7 | 7 | */ |
8 | 8 | |
| 9 | +require_once( dirname( __FILE__ ) . '/MathStatFunctions.i18n.magic.php' ); |
| 10 | + |
9 | 11 | $messages = array(); |
10 | 12 | |
11 | 13 | $messages['en'] = array( |
Index: trunk/extensions/MathStatFunctions/MathStatFunctions.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | $wgExtensionCredits['parserhook'][] = array( |
9 | 9 | 'path' => __FILE__, |
10 | 10 | 'name' => 'MathStatFunctions', |
11 | | - 'version' => '1.1', |
| 11 | + 'version' => '1.2', |
12 | 12 | 'author' => 'Carl Fürstenberg (AzaToth)', |
13 | 13 | 'description' => 'A collection of mathematical and statistical functions', |
14 | 14 | 'descriptionmsg' => 'msfunc_desc', |
— | — | @@ -16,7 +16,6 @@ |
17 | 17 | |
18 | 18 | $wgExtensionMessagesFiles['MathStatFunctions'] = dirname( __FILE__ ) . '/MathStatFunctions.i18n.php'; |
19 | 19 | $wgExtensionFunctions[] = 'wfSetupMathStatFunctions'; |
20 | | -$wgHooks['LanguageGetMagic'][] = 'wfMathStatFunctionsLanguageGetMagic'; |
21 | 20 | |
22 | 21 | /** |
23 | 22 | * \brief Exception class identifying that ParserFunctions is not available |
— | — | @@ -456,12 +455,3 @@ |
457 | 456 | |
458 | 457 | return true; |
459 | 458 | } |
460 | | - |
461 | | -function wfMathStatFunctionsLanguageGetMagic( &$magicWords, $langCode ) { |
462 | | - global $wgMathStatFunctionsMagic; |
463 | | - require_once( dirname(__FILE__) . '/MathStatFunctions.i18n.magic.php' ); |
464 | | - |
465 | | - if ( !in_array( $langCode, $wgMathStatFunctionsMagic ) ) $langCode = 'en'; |
466 | | - $magicWords = array_merge( $magicWords, $wgMathStatFunctionsMagic[$langCode] ); |
467 | | - return true; |
468 | | -} |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -550,9 +550,9 @@ |
551 | 551 | descmsg = maps_desc |
552 | 552 | optional = maps_name |
553 | 553 | |
554 | | -Math Stat |
555 | | -file = MathStatFunctions/MathStatFunctions.i18n.php |
| 554 | +Math Stat Functions |
556 | 555 | descmsg = msfunc_desc |
| 556 | +magicfile = MathStatFunctions/MathStatFunctions.i18n.magic.php |
557 | 557 | |
558 | 558 | Media Functions |
559 | 559 | |