Index: trunk/extensions/BookManager/BookManager.body.php |
— | — | @@ -173,27 +173,7 @@ |
174 | 174 | $aCustomVariableIds[] = 'chapternamee'; |
175 | 175 | return true; |
176 | 176 | } |
177 | | - # Function to declare magicwords |
178 | | - static function LanguageGetMagic( &$magicWords, $langCode = "en" ) { |
179 | | - # PREVPAGENAME |
180 | | - $magicWords['prevpagename'] = array ( 0, 'PREVPAGENAME' ); |
181 | | - # PREVPAGENAME |
182 | | - $magicWords['prevpagenamee'] = array ( 0, 'PREVPAGENAMEE' ); |
183 | | - # NEXTPAGENAME |
184 | | - $magicWords['nextpagename'] = array ( 0, 'NEXTPAGENAME' ); |
185 | | - # NEXTPAGENAMEE |
186 | | - $magicWords['nextpagenamee'] = array ( 0, 'NEXTPAGENAMEE' ); |
187 | | - # ROOTPAGENAME |
188 | | - $magicWords['rootpagename'] = array ( 0, 'ROOTPAGENAME' , 'BOOKNAME' ); |
189 | | - # ROOTPAGENAMEE |
190 | | - $magicWords['rootpagenamee'] = array ( 0, 'ROOTPAGENAMEE' , 'BOOKNAMEE' ); |
191 | | - # CHAPTERNAME |
192 | | - $magicWords['chaptername'] = array ( 0, 'CHAPTERNAME' ); |
193 | | - # CHAPTERNAMEE |
194 | | - $magicWords['chapternamee'] = array ( 0, 'CHAPTERNAMEE' ); |
195 | 177 | |
196 | | - return true; |
197 | | - } |
198 | 178 | # Values functions |
199 | 179 | static function prevpagename( &$parser, $text = null ) { |
200 | 180 | $t = self::pageText( $parser, $text, - 1 ); |
Index: trunk/extensions/BookManager/BookManager.i18n.magic.php |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$magicWords = array(); |
| 5 | + |
| 6 | +/** |
| 7 | + * English |
| 8 | + */ |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'prevpagename' => array( 0, 'PREVPAGENAME' ), |
| 11 | + 'prevpagenamee' => array( 0, 'PREVPAGENAMEE' ), |
| 12 | + 'nextpagename' => array( 0, 'NEXTPAGENAME' ), |
| 13 | + 'nextpagenamee' => array( 0, 'NEXTPAGENAMEE' ), |
| 14 | + 'rootpagename' => array( 0, 'ROOTPAGENAME', 'BOOKNAME' ), |
| 15 | + 'rootpagenamee' => array( 0, 'ROOTPAGENAMEE', 'BOOKNAMEE' ), |
| 16 | + 'chaptername' => array( 0, 'CHAPTERNAME' ), |
| 17 | + 'chapternamee' => array( 0, 'CHAPTERNAMEE' ), |
| 18 | +); |
Property changes on: trunk/extensions/BookManager/BookManager.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/extensions/BookManager/BookManager.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | $wgAutoloadClasses['BookManagerNavBar'] = $dir . '/BookManager.body.php'; |
44 | 44 | $wgAutoloadClasses['PrintVersion'] = $dir . '/BookManager.body.php'; |
45 | 45 | $wgExtensionMessagesFiles['BookManager'] = $dir . '/BookManager.i18n.php'; |
| 46 | +$wgExtensionMessagesFiles['BookManagerMagic'] = $dir . '/BookManager.i18n.magic.php'; |
46 | 47 | $wgExtensionAliasesFiles['BookManager'] = $dir . '/BookManager.alias.php'; |
47 | 48 | $wgSpecialPages['PrintVersion'] = 'PrintVersion'; |
48 | 49 | $wgSpecialPageGroups['PrintVersion'] = 'other'; |
— | — | @@ -78,8 +79,6 @@ |
79 | 80 | |
80 | 81 | $wgHooks['ParserFirstCallInit'][] = 'BookManagerVariables::register'; |
81 | 82 | |
82 | | -$wgHooks['LanguageGetMagic'][] = 'BookManagerVariables::LanguageGetMagic'; |
83 | | - |
84 | 83 | $wgHooks['MagicWordwgVariableIDs'][] = 'BookManagerVariables::DeclareVarIds'; |
85 | 84 | |
86 | 85 | $wgHooks['ParserGetVariableValueSwitch'][] = 'BookManagerVariables::AssignAValue'; |