Index: branches/wmf/1.16wmf4/extensions/VariablePage/VariablePage.alias.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Aliases for special pages of VariablePage extension. |
| 5 | + * |
| 6 | + * @file |
| 7 | + */ |
| 8 | + |
| 9 | +$specialPageAliases = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Nike |
| 13 | + */ |
| 14 | +$specialPageAliases['en'] = array( |
| 15 | + 'VariablePage' => array( 'VariablePage' ), |
| 16 | +); |
Property changes on: branches/wmf/1.16wmf4/extensions/VariablePage/VariablePage.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Index: branches/wmf/1.16wmf4/extensions/VariablePage/VariablePage.body.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | | - public function execute() { |
| 15 | + public function execute( $par ) { |
16 | 16 | global $wgOut, $wgRequest; |
17 | 17 | global $wgVariablePagePossibilities; |
18 | 18 | |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | * We use a # larger than 100 to increase 'randomness' |
53 | 53 | */ |
54 | 54 | $random_number = mt_rand( 0, 100*100 ); |
55 | | - $offset = 0; |
| 55 | + $offset = 0; |
56 | 56 | |
57 | 57 | foreach ( $page_possibilities as $url => $probability ) { |
58 | 58 | $offset += $probability * 100; |
Index: branches/wmf/1.16wmf4/extensions/VariablePage/VariablePage.i18n.php |
— | — | @@ -29,6 +29,8 @@ |
30 | 30 | * @author Kghbln |
31 | 31 | */ |
32 | 32 | $messages['de'] = array( |
| 33 | + 'variablepage' => 'VariablePage', |
| 34 | + 'variablepage-navlink_text' => 'Spenden', |
33 | 35 | 'variablepage-desc' => 'Ermöglicht ressourcenschonende variable Weiterleitungen von Wikiseiten', |
34 | 36 | ); |
35 | 37 | |
— | — | @@ -43,6 +45,8 @@ |
44 | 46 | * @author Toliño |
45 | 47 | */ |
46 | 48 | $messages['gl'] = array( |
| 49 | + 'variablepage' => 'Páxina variable', |
| 50 | + 'variablepage-navlink_text' => 'Doar', |
47 | 51 | 'variablepage-desc' => 'Redirección lixeira de páxina variable', |
48 | 52 | ); |
49 | 53 | |
— | — | @@ -85,6 +89,8 @@ |
86 | 90 | * @author Bjankuloski06 |
87 | 91 | */ |
88 | 92 | $messages['mk'] = array( |
| 93 | + 'variablepage' => 'ПроменливаСтраница', |
| 94 | + 'variablepage-navlink_text' => 'Донирајте', |
89 | 95 | 'variablepage-desc' => 'Леко променливо пренасочување на страници', |
90 | 96 | ); |
91 | 97 | |
— | — | @@ -92,6 +98,8 @@ |
93 | 99 | * @author Siebrand |
94 | 100 | */ |
95 | 101 | $messages['nl'] = array( |
| 102 | + 'variablepage' => 'Variabele pagina', |
| 103 | + 'variablepage-navlink_text' => 'Donaties', |
96 | 104 | 'variablepage-desc' => "Lichtgewicht variabele doorverwijzing voor pagina's", |
97 | 105 | ); |
98 | 106 | |
— | — | @@ -99,6 +107,8 @@ |
100 | 108 | * @author Sp5uhe |
101 | 109 | */ |
102 | 110 | $messages['pl'] = array( |
| 111 | + 'variablepage' => 'Zmienna strona', |
| 112 | + 'variablepage-navlink_text' => 'Darowizny', |
103 | 113 | 'variablepage-desc' => 'Prosta strona przekierowująca losowo', |
104 | 114 | ); |
105 | 115 | |
— | — | @@ -106,6 +116,8 @@ |
107 | 117 | * @author Dragonòt |
108 | 118 | */ |
109 | 119 | $messages['pms'] = array( |
| 120 | + 'variablepage' => 'PàginaVariabla', |
| 121 | + 'variablepage-navlink_text' => 'Doné', |
110 | 122 | 'variablepage-desc' => 'Rediression ëd pàgina variàbila ëd peis linger', |
111 | 123 | ); |
112 | 124 | |
— | — | @@ -113,6 +125,8 @@ |
114 | 126 | * @author Hamilton Abreu |
115 | 127 | */ |
116 | 128 | $messages['pt'] = array( |
| 129 | + 'variablepage' => 'Página Variável', |
| 130 | + 'variablepage-navlink_text' => 'Donativo', |
117 | 131 | 'variablepage-desc' => 'Redireccionamento ligeiro de páginas variáveis', |
118 | 132 | ); |
119 | 133 | |
— | — | @@ -120,6 +134,8 @@ |
121 | 135 | * @author Giro720 |
122 | 136 | */ |
123 | 137 | $messages['pt-br'] = array( |
| 138 | + 'variablepage' => 'VariablePage', |
| 139 | + 'variablepage-navlink_text' => 'Doar', |
124 | 140 | 'variablepage-desc' => 'Redirecionamento ligeiro de páginas variáveis', |
125 | 141 | ); |
126 | 142 | |
— | — | @@ -127,6 +143,8 @@ |
128 | 144 | * @author Александр Сигачёв |
129 | 145 | */ |
130 | 146 | $messages['ru'] = array( |
| 147 | + 'variablepage' => 'ПеременнаяСтраница', |
| 148 | + 'variablepage-navlink_text' => 'Пожертвовать', |
131 | 149 | 'variablepage-desc' => 'Простое перенаправление на различные страницы', |
132 | 150 | ); |
133 | 151 | |
Index: branches/wmf/1.16wmf4/extensions/VariablePage/VariablePage.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | exit( 1 ); |
14 | 14 | } |
15 | 15 | |
16 | | -$wgExtensionCredits[ 'VariablePage' ][] = array( |
| 16 | +$wgExtensionCredits['specialpage'][] = array( |
17 | 17 | 'path' => __FILE__, |
18 | 18 | 'name' => 'VariablePage', |
19 | 19 | 'version' => '0.1', |
— | — | @@ -66,6 +66,7 @@ |
67 | 67 | |
68 | 68 | $wgAutoloadClasses[ 'SpecialVariablePage' ] = $dir . 'VariablePage.body.php'; |
69 | 69 | $wgExtensionMessagesFiles[ 'VariablePage' ] = $dir . 'VariablePage.i18n.php'; |
| 70 | +$wgExtensionAliasesFiles[ 'VariablePage' ] = $dir . 'VariablePage.alias.php'; |
70 | 71 | $wgSpecialPages[ 'VariablePage' ] = 'SpecialVariablePage'; |
71 | 72 | $wgSpecialPageGroups[ 'VariablePage' ] = 'contribution'; |
72 | 73 | |
— | — | @@ -78,10 +79,10 @@ |
79 | 80 | |
80 | 81 | // make sure that we should be showing a sidebar link |
81 | 82 | if ( $wgVariablePageShowSidebarLink ) { |
82 | | - $url = Title::makeTitle( NS_SPECIAL, wfMsg( 'variablepage' ) )->getLocalUrl(); |
| 83 | + $title = SpecialPage::getTitleFor( 'VariablePage' ); |
83 | 84 | $bar['navigation'][] = array( |
84 | 85 | 'text' => wfMsg( 'variablepage-navlink_text' ), |
85 | | - 'href' => wfAppendQuery( $url, $wgVariablePageSidebarLinkQuery ), |
| 86 | + 'href' => $title->getLocalUrl( $wgVariablePageSidebarLinkQuery ), |
86 | 87 | 'id' => 'n-variablepage', |
87 | 88 | 'active' => true, |
88 | 89 | ); |
Property changes on: branches/wmf/1.16wmf4/extensions/VariablePage |
___________________________________________________________________ |
Modified: svn:mergeinfo |
89 | 90 | Merged /trunk/extensions/VariablePage:r73622-73633 |