Index: trunk/extensions/SpamBlacklist/SpamBlacklist.php |
— | — | @@ -26,6 +26,16 @@ |
27 | 27 | 'description' => 'Regex based anti spam tool', |
28 | 28 | ); |
29 | 29 | |
| 30 | +$wgExtensionFunctions[] = 'wfSpamBlacklistMessageLoader'; |
| 31 | + |
| 32 | +function wfSpamBlacklistMessageLoader() { |
| 33 | + global $wgMessageCache; |
| 34 | + require_once( 'SpamBlacklist.i18n.php' ); |
| 35 | + foreach( efSpamBlacklistMessages() as $lang => $messages ) { |
| 36 | + $wgMessageCache->addMessages( $messages, $lang ); |
| 37 | + } |
| 38 | +} |
| 39 | + |
30 | 40 | function wfSpamBlacklistLoader( &$title, $text, $section ) { |
31 | 41 | require_once( "SpamBlacklist_body.php" ); |
32 | 42 | static $spamObj = false; |
— | — | @@ -44,3 +54,4 @@ |
45 | 55 | |
46 | 56 | } # End invocation guard |
47 | 57 | |
| 58 | + |
Index: trunk/extensions/SpamBlacklist/SpamBlacklist.i18n.php |
— | — | @@ -0,0 +1,29 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for SpamBlacklist extension. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | +*/ |
| 8 | + |
| 9 | +/** |
| 10 | + * Prepare extension messages |
| 11 | + * |
| 12 | + * @return array |
| 13 | + */ |
| 14 | +function efSpamBlacklistMessages() { |
| 15 | + $messages = array( |
| 16 | + |
| 17 | +'en' => array( |
| 18 | + 'spam-whitelist' => ' |
| 19 | + #<!-- leave this line exactly as it is --> <pre> |
| 20 | +# Syntax is as follows: |
| 21 | +# * Everything from a "#" character to the end of the line is a comment |
| 22 | +# * Every non-blank line is a regex fragment which will only match hosts inside URLs |
| 23 | + |
| 24 | + #</pre> <!-- leave this line exactly as it is -->', |
| 25 | +) |
| 26 | + |
| 27 | +); |
| 28 | + |
| 29 | +return $messages; |
| 30 | +} |
Property changes on: trunk/extensions/SpamBlacklist/SpamBlacklist.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 31 | + native |