Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -26,14 +26,13 @@ |
27 | 27 | function execute() { |
28 | 28 | global $wgOut; |
29 | 29 | |
30 | | - $wgOut->addHTML( '<div dir="ltr">' ); |
31 | 30 | $wgOut->addWikiText( |
32 | 31 | $this->MediaWikiCredits() . |
| 32 | + $this->systemInformation() . |
33 | 33 | $this->extensionCredits() . |
34 | 34 | $this->wgHooks() |
35 | 35 | ); |
36 | 36 | $wgOut->addHTML( $this->IPInfo() ); |
37 | | - $wgOut->addHTML( '</div>' ); |
38 | 37 | } |
39 | 38 | |
40 | 39 | /**#@+ |
— | — | @@ -46,11 +45,11 @@ |
47 | 46 | * @static |
48 | 47 | */ |
49 | 48 | function MediaWikiCredits() { |
50 | | - $version = self::getVersion(); |
51 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 49 | + $ret = "<h2>" . wfMsgExt( 'version-licence', array( 'parseinline' ) ) . "</h2>\n"; |
52 | 50 | |
53 | | - $ret = |
| 51 | + $ret .= |
54 | 52 | "__NOTOC__ |
| 53 | + <div dir='ltr'> |
55 | 54 | This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', |
56 | 55 | copyright (C) 2001-2007 Magnus Manske, Brion Vibber, Lee Daniel Crocker, |
57 | 56 | Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason, |
— | — | @@ -70,11 +69,13 @@ |
71 | 70 | along with this program; if not, write to the Free Software |
72 | 71 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
73 | 72 | or [http://www.gnu.org/copyleft/gpl.html read it online] |
| 73 | + </div>"; |
74 | 74 | |
75 | | - * [http://www.mediawiki.org/ MediaWiki]: $version |
76 | | - * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") |
77 | | - * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion(); |
78 | | - |
| 75 | + $translation = wfMsgExt( 'version-licence-text', array( 'parseline' ) ); |
| 76 | + if( !( wfEmptyMsg( 'version-licence-text', $translation ) || $translation == '-' || $translation == '' ) ) { |
| 77 | + $ret .= "<h3>" . wfMsgExt( 'version-licence-header', array( 'parseinline' ) ) . "</h3>\n"; |
| 78 | + $ret .= $translation; |
| 79 | + } |
79 | 80 | return str_replace( "\t\t", '', $ret ) . "\n"; |
80 | 81 | } |
81 | 82 | |
— | — | @@ -93,15 +94,15 @@ |
94 | 95 | return ''; |
95 | 96 | |
96 | 97 | $extensionTypes = array( |
97 | | - 'specialpage' => 'Special pages', |
98 | | - 'parserhook' => 'Parser hooks', |
99 | | - 'variable' => 'Variables', |
100 | | - 'other' => 'Other', |
| 98 | + 'specialpage' => wfMsgExt( 'version-specialpages', array( 'parseinline' ) ), |
| 99 | + 'parserhook' => wfMsgExt( 'version-parserhooks', array( 'parseinline' ) ), |
| 100 | + 'variable' => wfMsgExt( 'version-variables', array( 'parseinline' ) ), |
| 101 | + 'other' => wfMsgExt( 'version-other', array( 'parseinline' ) ), |
101 | 102 | ); |
102 | 103 | wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) ); |
103 | 104 | |
104 | | - $out = "<h2>Extensions</h2>\n"; |
105 | | - $out .= wfOpenElement('table', array('id' => 'sv-ext') ); |
| 105 | + $out = "<h2>" . wfMsgExt( 'version-extensions', array( 'parseinline' ) ) . "</h2>\n"; |
| 106 | + $out .= Xml::openElement( 'table', array('id' => 'sv-ext', 'dir' => 'ltr' ) ); |
106 | 107 | |
107 | 108 | foreach ( $extensionTypes as $type => $text ) { |
108 | 109 | if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) { |
— | — | @@ -122,27 +123,27 @@ |
123 | 124 | } |
124 | 125 | |
125 | 126 | if ( count( $wgExtensionFunctions ) ) { |
126 | | - $out .= $this->openExtType('Extension functions'); |
| 127 | + $out .= $this->openExtType( wfMsgExt( 'version-extension-functions', array( 'parseinline' ) ) ); |
127 | 128 | $out .= '<tr><td colspan="3">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n"; |
128 | 129 | } |
129 | 130 | |
130 | 131 | if ( $cnt = count( $tags = $wgParser->getTags() ) ) { |
131 | 132 | for ( $i = 0; $i < $cnt; ++$i ) |
132 | 133 | $tags[$i] = "<{$tags[$i]}>"; |
133 | | - $out .= $this->openExtType('Parser extension tags'); |
| 134 | + $out .= $this->openExtType( wfMsgExt( 'version-parser-extensiontags', array( 'parseinline' ) ) ); |
134 | 135 | $out .= '<tr><td colspan="3">' . $this->listToText( $tags ). "</td></tr>\n"; |
135 | 136 | } |
136 | 137 | |
137 | 138 | if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
138 | | - $out .= $this->openExtType('Parser function hooks'); |
| 139 | + $out .= $this->openExtType( wfMsgExt( 'version-parser-function-hooks', array( 'parseinline' ) ) ); |
139 | 140 | $out .= '<tr><td colspan="3">' . $this->listToText( $fhooks ) . "</td></tr>\n"; |
140 | 141 | } |
141 | 142 | |
142 | 143 | if ( count( $wgSkinExtensionFunction ) ) { |
143 | | - $out .= $this->openExtType('Skin extension functions'); |
| 144 | + $out .= $this->openExtType( wfMsgExt( 'version-skin-extension-functions', array( 'parseinline' ) ) ); |
144 | 145 | $out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunction ) . "</td></tr>\n"; |
145 | 146 | } |
146 | | - $out .= wfCloseElement( 'table' ); |
| 147 | + $out .= Xml::closeElement( 'table' ); |
147 | 148 | return $out; |
148 | 149 | } |
149 | 150 | |
— | — | @@ -181,32 +182,65 @@ |
182 | 183 | $myWgHooks = $wgHooks; |
183 | 184 | ksort( $myWgHooks ); |
184 | 185 | |
185 | | - $ret = "<h2>Hooks</h2>\n" |
186 | | - . wfOpenElement('table', array('id' => 'sv-hooks') ) |
187 | | - . "<tr><th>Hook name</th><th>Subscribed by</th></tr>\n"; |
| 186 | + $ret = "<h2>" . wfMsgExt( 'version-hooks', array( 'parseinline' ) ) . "</h2>\n"; |
| 187 | + $ret .= Xml::openElement( 'table', array( 'id' => 'sv-hooks', 'dir' => 'ltr' ) ); |
| 188 | + $ret .= "<tr> |
| 189 | + <th>" . wfMsgExt( 'version-hook-name', array( 'parseinline' ) ) . "</th> |
| 190 | + <th>" . wfMsgExt( 'version-hook-subscribedby', array( 'parseinline' ) ) . "</th> |
| 191 | + </tr>\n"; |
188 | 192 | |
189 | 193 | foreach ($myWgHooks as $hook => $hooks) |
190 | | - $ret .= "<tr><td>$hook</td><td>" . $this->listToText( $hooks ) . "</td></tr>\n"; |
| 194 | + $ret .= "<tr> |
| 195 | + <td>$hook</td> |
| 196 | + <td>" . $this->listToText( $hooks ) . "</td> |
| 197 | + </tr>\n"; |
191 | 198 | |
192 | | - $ret .= '</table>'; |
| 199 | + $ret .= Xml::closeElement( 'table' ); |
193 | 200 | return $ret; |
194 | 201 | } else |
195 | 202 | return ''; |
196 | 203 | } |
197 | 204 | |
| 205 | + function systemInformation() { |
| 206 | + $version = self::getVersion(); |
| 207 | + $dbr = wfGetDB( DB_SLAVE ); |
| 208 | + |
| 209 | + $ret = "<h2>" . wfMsgExt( 'version-system', array( 'parseinline' ) ) . "</h2>\n"; |
| 210 | + $ret .= Xml::openElement( 'table', array( 'id' => 'sv-software', 'dir' => 'ltr' ) ); |
| 211 | + $ret .= "<tr> |
| 212 | + <th>" . wfMsgExt( 'version-software', array( 'parseinline' ) ) . "</th> |
| 213 | + <th>" . wfMsgExt( 'version-version', array( 'parseinline' ) ) . "</th> |
| 214 | + </tr> |
| 215 | + <tr> |
| 216 | + <td>[http://www.mediawiki.org/ MediaWiki]:</td> |
| 217 | + <td>$version</td> |
| 218 | + </tr> |
| 219 | + <tr> |
| 220 | + <td>[http://www.php.net/ PHP]:</td> |
| 221 | + <td>" . phpversion() . " (" . php_sapi_name() . ")</td> |
| 222 | + </tr> |
| 223 | + <tr> |
| 224 | + <td>" . $dbr->getSoftwareLink() . ":</td> |
| 225 | + <td>" . $dbr->getServerVersion() . "</td> |
| 226 | + </tr>\n"; |
| 227 | + $ret .= Xml::closeElement( 'table' ); |
| 228 | + |
| 229 | + return $ret; |
| 230 | + } |
| 231 | + |
198 | 232 | private function openExtType($text, $name = null) { |
199 | 233 | $opt = array( 'colspan' => 3 ); |
200 | 234 | $out = ''; |
201 | 235 | |
202 | 236 | if(!$this->firstExtOpened) { |
203 | 237 | // Insert a spacing line |
204 | | - $out .= '<tr class="sv-space">' . wfElement( 'td', $opt ) . "</tr>\n"; |
| 238 | + $out .= '<tr class="sv-space">' . Xml::tags( 'td', $opt, '' ) . "</tr>\n"; |
205 | 239 | } |
206 | 240 | $this->firstExtOpened = false; |
207 | 241 | |
208 | 242 | if($name) { $opt['id'] = "sv-$name"; } |
209 | 243 | |
210 | | - $out .= "<tr>" . wfElement( 'th', $opt, $text) . "</tr>\n"; |
| 244 | + $out .= "<tr>" . Xml::tags( 'th', $opt, $text) . "</tr>\n"; |
211 | 245 | return $out; |
212 | 246 | } |
213 | 247 | |
— | — | @@ -226,42 +260,16 @@ |
227 | 261 | * @return string |
228 | 262 | */ |
229 | 263 | function listToText( $list ) { |
230 | | - $cnt = count( $list ); |
231 | 264 | |
232 | | - if ( $cnt == 1 ) { |
233 | | - // Enforce always returning a string |
234 | | - return (string)$this->arrayToString( $list[0] ); |
235 | | - } elseif ( $cnt == 0 ) { |
| 265 | + if ( count( $list ) ) { |
| 266 | + sort( $list ); |
| 267 | + return implode( ', ', $list ); |
| 268 | + } else { |
236 | 269 | return ''; |
237 | | - } else { |
238 | | - $t = array_slice( $list, 0, $cnt - 1 ); |
239 | | - $one = array_map( array( &$this, 'arrayToString' ), $t ); |
240 | | - $two = $this->arrayToString( $list[$cnt - 1] ); |
241 | | - |
242 | | - return implode( ', ', $one ) . " and $two"; |
243 | 270 | } |
244 | 271 | } |
245 | 272 | |
246 | 273 | /** |
247 | | - * @static |
248 | | - * |
249 | | - * @param mixed $list Will convert an array to string if given and return |
250 | | - * the paramater unaltered otherwise |
251 | | - * @return mixed |
252 | | - */ |
253 | | - function arrayToString( $list ) { |
254 | | - if( is_object( $list ) ) { |
255 | | - $class = get_class( $list ); |
256 | | - return "($class)"; |
257 | | - } elseif ( ! is_array( $list ) ) { |
258 | | - return $list; |
259 | | - } else { |
260 | | - $class = get_class( $list[0] ); |
261 | | - return "($class, {$list[1]})"; |
262 | | - } |
263 | | - } |
264 | | - |
265 | | - /** |
266 | 274 | * Retrieve the revision number of a Subversion working directory. |
267 | 275 | * |
268 | 276 | * @param string $dir |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1197,7 +1197,7 @@ |
1198 | 1198 | * to ensure that client-side caches don't keep obsolete copies of global |
1199 | 1199 | * styles. |
1200 | 1200 | */ |
1201 | | -$wgStyleVersion = '77'; |
| 1201 | +$wgStyleVersion = '78'; |
1202 | 1202 | |
1203 | 1203 | |
1204 | 1204 | # Server-side caching: |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -109,6 +109,7 @@ |
110 | 110 | classes: mw-code, mw-css, mw-js) |
111 | 111 | * (bug 6711) Add $wgAddGroups and $wgRemoveGroups to allow finer control over |
112 | 112 | usergroup assignment. |
| 113 | +* (bug 10365) Localization of Special:Version |
113 | 114 | |
114 | 115 | == Bugfixes since 1.10 == |
115 | 116 | |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -2292,6 +2292,46 @@ |
2293 | 2293 | 'lag-warn-normal' => 'Bearbeitungen der letzten $1 Sekunden werden in dieser Liste noch nicht angezeigt.', |
2294 | 2294 | 'lag-warn-high' => 'Auf Grund hoher Datenbankauslastung werden die Bearbeitungen der letzten $1 Sekunden in dieser Liste noch nicht angezeigt.', |
2295 | 2295 | |
| 2296 | +# Special:Version |
| 2297 | +'version-extensions' => 'Installierte Erweiterungen', |
| 2298 | +'version-specialpages' => 'Spezialseiten', |
| 2299 | +'version-parserhooks' => 'Parser-Hooks', |
| 2300 | +'version-variables' => 'Variablen', |
| 2301 | +'version-other' => 'Anderes', |
| 2302 | +'version-hooks' => "Schnittstellen ''(Hooks)''", |
| 2303 | +'version-licence' => 'Lizenz-Informationen', |
| 2304 | +'version-licence-header' => 'Unverbindliche Übersetzung:', |
| 2305 | +'version-licence-text' => " |
| 2306 | + Dieses Wiki basiert auf '''[http://www.mediawiki.org/ MediaWiki]''', |
| 2307 | + die Urheberrechte (C) 2001-2007 liegen bei Magnus Manske, Brion Vibber, Lee Daniel Crocker, |
| 2308 | + Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason, |
| 2309 | + Niklas Laxström, Domas Mituzas, Rob Church und anderen. |
| 2310 | + |
| 2311 | + MediaWiki ist eine freie Software; Sie dürfen sie weiterverteilen und/oder verändern, |
| 2312 | + sofern die Bedingungen der ''GNU General Public License'', veröffentlicht |
| 2313 | + durch die ''Free Software Foundation'' in Lizenzversion 2 oder |
| 2314 | + (nach Ihrer Wahl) jeder späteren Version, eingehalten werden. |
| 2315 | + |
| 2316 | + MediaWiki wird verteilt in der Hoffnung, dass sie nutzbar ist, |
| 2317 | + aber OHNE JEDE GARANTIE, es wird auch keine implizite GEBRAUCHSTAUGLICHKEIT |
| 2318 | + oder TAUGLICHKEIT FÜR BESONDERE ZWECKE zugesagt. |
| 2319 | + Siehe die ''GNU General Public License'' für weitere Details. |
| 2320 | + |
| 2321 | + Sie sollten eine [{{SERVER}}{{SCRIPTPATH}}/COPYING Kopie der ''GNU General Public License''] |
| 2322 | + zusammen mit dieser Software erhalten haben; falls diese fehlt, schreiben Sie an |
| 2323 | + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 2324 | + oder [http://www.gnu.org/copyleft/gpl.html lesen Sie sie online]. |
| 2325 | +", # See [[Special:Version]] for the original licence text in English. |
| 2326 | +'version-system' => 'System-Informationen', |
| 2327 | +'version-extension-functions' => 'Funktionsaufrufe', |
| 2328 | +'version-parser-extensiontags' => "Parser-Erweiterungen ''(tags)''", |
| 2329 | +'version-parser-function-hooks' => 'Parser-Funktionen', |
| 2330 | +'version-skin-extension-functions' => 'Skin extension functions', |
| 2331 | +'version-hook-name' => 'Schnittstellenname', |
| 2332 | +'version-hook-subscribedby' => 'aufgerufen durch', |
| 2333 | +'version-software' => 'Software', |
| 2334 | +'version-Version' => 'Version', |
| 2335 | + |
2296 | 2336 | ); |
2297 | 2337 | |
2298 | 2338 | ?> |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2908,6 +2908,26 @@ |
2909 | 2909 | 'lag-warn-high' => 'Due to high database server lag, changes newer than $1 seconds |
2910 | 2910 | may not be shown in this list.', |
2911 | 2911 | |
| 2912 | +# Special:Version |
| 2913 | +'version-extensions' => 'Installed extensions', |
| 2914 | +'version-specialpages' => 'Special pages', |
| 2915 | +'version-parserhooks' => 'Parser hooks', |
| 2916 | +'version-variables' => 'Variables', |
| 2917 | +'version-other' => 'Other', |
| 2918 | +'version-hooks' => 'Hooks', |
| 2919 | +'version-licence' => 'Licence information', |
| 2920 | +'version-licence-header' => 'Translation without obligation:', |
| 2921 | +'version-licence-text' => '-', # See [[Special:Version]] for the original licence text in English. |
| 2922 | +'version-system' => 'System information', |
| 2923 | +'version-extension-functions' => 'Extension functions', |
| 2924 | +'version-parser-extensiontags' => 'Parser extension tags', |
| 2925 | +'version-parser-function-hooks' => 'Parser function hooks', |
| 2926 | +'version-skin-extension-functions' => 'Skin extension functions', |
| 2927 | +'version-hook-name' => 'Hook name', |
| 2928 | +'version-hook-subscribedby' => 'Subscribed by', |
| 2929 | +'version-software' => 'Software', |
| 2930 | +'version-version' => 'Version', |
| 2931 | + |
2912 | 2932 | ); |
2913 | 2933 | |
2914 | 2934 | ?> |
Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2130,6 +2130,26 @@ |
2131 | 2131 | 'lag-warn-normal', |
2132 | 2132 | 'lag-warn-high', |
2133 | 2133 | ), |
| 2134 | + 'version' => array( |
| 2135 | + 'version-extensions', |
| 2136 | + 'version-specialpages', |
| 2137 | + 'version-parserhooks', |
| 2138 | + 'version-variables', |
| 2139 | + 'version-other', |
| 2140 | + 'version-hooks', |
| 2141 | + 'version-licence', |
| 2142 | + 'version-licence-header', |
| 2143 | + 'version-licence-text', |
| 2144 | + 'version-system', |
| 2145 | + 'version-extension-functions', |
| 2146 | + 'version-parser-extensiontags', |
| 2147 | + 'version-parser-function-hooks', |
| 2148 | + 'version-skin-extension-functions', |
| 2149 | + 'version-hook-name', |
| 2150 | + 'version-hook-subscribedby', |
| 2151 | + 'version-software', |
| 2152 | + 'version-version', |
| 2153 | + ), |
2134 | 2154 | ); |
2135 | 2155 | /** Comments for each block */ |
2136 | 2156 | $wgBlockComments = array( |
— | — | @@ -2296,6 +2316,7 @@ |
2297 | 2317 | 'sizeunits' => 'Size units', |
2298 | 2318 | 'livepreview' => 'Live preview', |
2299 | 2319 | 'lagwarning' => 'Friendlier slave lag warnings', |
| 2320 | + 'version' => 'Special:Version', |
2300 | 2321 | ); |
2301 | 2322 | |
2302 | 2323 | /** Short comments for standalone messages */ |
— | — | @@ -2314,6 +2335,7 @@ |
2315 | 2336 | 'exif-orientation-7' => '0th row: right; 0th column: bottom', |
2316 | 2337 | 'exif-orientation-8' => '0th row: left; 0th column: bottom', |
2317 | 2338 | 'autoredircomment' => 'This should be changed to the new naming convention, but existed beforehand', |
| 2339 | + 'version-version' => 'See [[Special:Version]] for the original licence text in English.', |
2318 | 2340 | ); |
2319 | 2341 | |
2320 | 2342 | /** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */ |
Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -1539,17 +1539,18 @@ |
1540 | 1540 | |
1541 | 1541 | /** Special:Version */ |
1542 | 1542 | |
1543 | | -table#sv-ext, table#sv-hooks { |
| 1543 | +table#sv-ext, table#sv-hooks, table#sv-software { |
1544 | 1544 | margin: 1em; |
1545 | 1545 | padding:0em; |
| 1546 | + border-collapse: collapse; |
1546 | 1547 | } |
1547 | 1548 | |
1548 | | -#sv-ext td, #sv-hooks td, |
1549 | | -#sv-ext th, #sv-hooks th { |
| 1549 | +#sv-ext td, #sv-hooks td, #sv-software td, |
| 1550 | +#sv-ext th, #sv-hooks th, #sv-software th { |
1550 | 1551 | border: 1px solid #A0A0A0; |
1551 | 1552 | padding: 0 0.15em 0 0.15em; |
1552 | 1553 | } |
1553 | | -#sv-ext th, #sv-hooks th { |
| 1554 | +#sv-ext th, #sv-hooks th, #sv-software th { |
1554 | 1555 | background-color: #F0F0F0; |
1555 | 1556 | color: black; |
1556 | 1557 | padding: 0 0.15em 0 0.15em; |
Index: trunk/phase3/skins/monobook/handheld.css |
— | — | @@ -1245,17 +1245,18 @@ |
1246 | 1246 | |
1247 | 1247 | /** Special:Version */ |
1248 | 1248 | |
1249 | | -table#sv-ext, table#sv-hooks { |
| 1249 | +table#sv-ext, table#sv-hooks, table#sv-software { |
1250 | 1250 | margin: 1em; |
1251 | 1251 | padding:0em; |
| 1252 | + border-collapse: collapse; |
1252 | 1253 | } |
1253 | 1254 | |
1254 | | -#sv-ext td, #sv-hooks td, |
1255 | | -#sv-ext th, #sv-hooks th { |
| 1255 | +#sv-ext td, #sv-hooks td, #sv-software td |
| 1256 | +#sv-ext th, #sv-hooks th, #sv-software th { |
1256 | 1257 | border: 1px solid #A0A0A0; |
1257 | 1258 | padding: 0 0.15em 0 0.15em; |
1258 | 1259 | } |
1259 | | -#sv-ext th, #sv-hooks th { |
| 1260 | +#sv-ext th, #sv-hooks th, #sv-software th { |
1260 | 1261 | background-color: #F0F0F0; |
1261 | 1262 | color: black; |
1262 | 1263 | padding: 0 0.15em 0 0.15em; |
— | — | @@ -1299,4 +1300,4 @@ |
1300 | 1301 | /* Kill big bulky stuff that will clog up the screen */ |
1301 | 1302 | display: none; |
1302 | 1303 | } |
1303 | | -} |
\ No newline at end of file |
| 1304 | +} |