Index: trunk/extensions/BlockTitles/BlockTitles.i18n.php |
— | — | @@ -0,0 +1,33 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Messages file for the BlockTitles extension |
| 6 | + */ |
| 7 | + |
| 8 | +/** |
| 9 | + * Fetch extension messages |
| 10 | + * |
| 11 | + * @return array |
| 12 | + */ |
| 13 | +function efBlockTitlesMessages() { |
| 14 | + $messages = array( |
| 15 | + |
| 16 | +/** |
| 17 | + * English (Travis Derouin) |
| 18 | + */ |
| 19 | +'en' => array( |
| 20 | + 'block_title_error_page_title' => 'Blocked Title', |
| 21 | + 'block_title_error' => 'Sorry, the title of this article is not allowed to be saved.', |
| 22 | +), |
| 23 | + |
| 24 | +/** |
| 25 | + * French (Bertrand Grondin) |
| 26 | + */ |
| 27 | +'fr' => array( |
| 28 | + 'block_title_error_page_title' => 'Titre invalide', |
| 29 | + 'block_title_error' => 'Désolé, le titre de cet article n’est pas autorisé à être sauvegardé.', |
| 30 | +), |
| 31 | + |
| 32 | + ); |
| 33 | + return $messages; |
| 34 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/BlockTitles/BlockTitles.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 35 | + native |
Index: trunk/extensions/BlockTitles/BlockTitles.php |
— | — | @@ -14,7 +14,6 @@ |
15 | 15 | */ |
16 | 16 | |
17 | 17 | $wgExtensionFunctions[] = 'wfBlockTitles'; |
18 | | - |
19 | 18 | $wgExtensionCredits['other'][] = array( |
20 | 19 | 'name' => 'BlockTitles', |
21 | 20 | 'author' => 'Travis Derouin', |
— | — | @@ -31,12 +30,9 @@ |
32 | 31 | |
33 | 32 | function wfBlockTitles() { |
34 | 33 | global $wgMessageCache; |
35 | | - $wgMessageCache->addMessages( |
36 | | - array( |
37 | | - 'block_title_error_page_title' => 'Invalid Title', |
38 | | - 'block_title_error' => 'Sorry, the title of this article is not allowed to be saved.', |
39 | | - ) |
40 | | - ); |
| 34 | + require_once( dirname( __FILE__ ) . '/BlockTitles.i18n.php' ); |
| 35 | + foreach( efBlockTitlesMessages() as $lang => $messages ) |
| 36 | + $wgMessageCache->addMessages( $messages, $lang ); |
41 | 37 | } |
42 | 38 | |
43 | 39 | function wfCheckBlockTitles (&$article ) { |