Let English licence information hard coded to avoid any possibility to suppress this important text
Sort extension functions, parser extension tags and parser extension tags alphabetically
Use table for software information too.
WTF needs/uses the hook 'SpecialVersionExtensionTypes'? Not documented anywhere in trunk.
classes: mw-code, mw-css, mw-js)
* (bug 6711) Add $wgAddGroups and $wgRemoveGroups to allow finer control over
usergroup assignment.
+* (bug 10365) Localization of Special:Version
== Bugfixes since 1.10 ==
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '77';
+$wgStyleVersion = '78';
# Server-side caching:
function execute() {
global $wgOut;
- $wgOut->addHTML( '<div dir="ltr">' );
$wgOut->addWikiText(
$this->MediaWikiCredits() .
+ $this->systemInformation() .
$this->extensionCredits() .
$this->wgHooks()
);
$wgOut->addHTML( $this->IPInfo() );
- $wgOut->addHTML( '</div>' );
}
/**#@+
* @static
*/
function MediaWikiCredits() {
- $version = self::getVersion();
- $dbr = wfGetDB( DB_SLAVE );
+ $ret = "<h2>" . wfMsgExt( 'version-licence', array( 'parseinline' ) ) . "</h2>\n";
- $ret =
+ $ret .=
"__NOTOC__
+ <div dir='ltr'>
This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
copyright (C) 2001-2007 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason,
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
or [http://www.gnu.org/copyleft/gpl.html read it online]
+ </div>";
- * [http://www.mediawiki.org/ MediaWiki]: $version
- * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
- * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion();
-
+ $translation = wfMsgExt( 'version-licence-text', array( 'parseline' ) );
+ if( !( wfEmptyMsg( 'version-licence-text', $translation ) || $translation == '-' || $translation == '' ) ) {
+ $ret .= "<h3>" . wfMsgExt( 'version-licence-header', array( 'parseinline' ) ) . "</h3>\n";
+ $ret .= $translation;
+ }
return str_replace( "\t\t", '', $ret ) . "\n";
}
return '';
$extensionTypes = array(
- 'specialpage' => 'Special pages',
- 'parserhook' => 'Parser hooks',
- 'variable' => 'Variables',
- 'other' => 'Other',
+ 'specialpage' => wfMsgExt( 'version-specialpages', array( 'parseinline' ) ),
+ 'parserhook' => wfMsgExt( 'version-parserhooks', array( 'parseinline' ) ),
+ 'variable' => wfMsgExt( 'version-variables', array( 'parseinline' ) ),
+ 'other' => wfMsgExt( 'version-other', array( 'parseinline' ) ),
);
wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );
- $out = "<h2>Extensions</h2>\n";
- $out .= wfOpenElement('table', array('id' => 'sv-ext') );
+ $out = "<h2>" . wfMsgExt( 'version-extensions', array( 'parseinline' ) ) . "</h2>\n";
+ $out .= Xml::openElement( 'table', array('id' => 'sv-ext', 'dir' => 'ltr' ) );
foreach ( $extensionTypes as $type => $text ) {
if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) {
}
if ( count( $wgExtensionFunctions ) ) {
- $out .= $this->openExtType('Extension functions');
+ $out .= $this->openExtType( wfMsgExt( 'version-extension-functions', array( 'parseinline' ) ) );
$out .= '<tr><td colspan="3">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
}
if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
for ( $i = 0; $i < $cnt; ++$i )
$tags[$i] = "<{$tags[$i]}>";
- $out .= $this->openExtType('Parser extension tags');
+ $out .= $this->openExtType( wfMsgExt( 'version-parser-extensiontags', array( 'parseinline' ) ) );
$out .= '<tr><td colspan="3">' . $this->listToText( $tags ). "</td></tr>\n";
}
if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
- $out .= $this->openExtType('Parser function hooks');
+ $out .= $this->openExtType( wfMsgExt( 'version-parser-function-hooks', array( 'parseinline' ) ) );
$out .= '<tr><td colspan="3">' . $this->listToText( $fhooks ) . "</td></tr>\n";
}
if ( count( $wgSkinExtensionFunction ) ) {
- $out .= $this->openExtType('Skin extension functions');
+ $out .= $this->openExtType( wfMsgExt( 'version-skin-extension-functions', array( 'parseinline' ) ) );
$out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunction ) . "</td></tr>\n";
}
- $out .= wfCloseElement( 'table' );
+ $out .= Xml::closeElement( 'table' );
return $out;
}
$myWgHooks = $wgHooks;
ksort( $myWgHooks );
- $ret = "<h2>Hooks</h2>\n"
- . wfOpenElement('table', array('id' => 'sv-hooks') )
- . "<tr><th>Hook name</th><th>Subscribed by</th></tr>\n";
+ $ret = "<h2>" . wfMsgExt( 'version-hooks', array( 'parseinline' ) ) . "</h2>\n";
+ $ret .= Xml::openElement( 'table', array( 'id' => 'sv-hooks', 'dir' => 'ltr' ) );
+ $ret .= "<tr>
+ <th>" . wfMsgExt( 'version-hook-name', array( 'parseinline' ) ) . "</th>
+ <th>" . wfMsgExt( 'version-hook-subscribedby', array( 'parseinline' ) ) . "</th>
+ </tr>\n";
foreach ($myWgHooks as $hook => $hooks)
- $ret .= "<tr><td>$hook</td><td>" . $this->listToText( $hooks ) . "</td></tr>\n";
+ $ret .= "<tr>
+ <td>$hook</td>
+ <td>" . $this->listToText( $hooks ) . "</td>
+ </tr>\n";
- $ret .= '</table>';
+ $ret .= Xml::closeElement( 'table' );
return $ret;
} else
return '';
}
+ function systemInformation() {
+ $version = self::getVersion();
+ $dbr = wfGetDB( DB_SLAVE );
+
+ $ret = "<h2>" . wfMsgExt( 'version-system', array( 'parseinline' ) ) . "</h2>\n";
+ $ret .= Xml::openElement( 'table', array( 'id' => 'sv-software', 'dir' => 'ltr' ) );
+ $ret .= "<tr>
+ <th>" . wfMsgExt( 'version-software', array( 'parseinline' ) ) . "</th>
+ <th>" . wfMsgExt( 'version-version', array( 'parseinline' ) ) . "</th>
+ </tr>
+ <tr>
+ <td>[http://www.mediawiki.org/ MediaWiki]:</td>
+ <td>$version</td>
+ </tr>
+ <tr>
+ <td>[http://www.php.net/ PHP]:</td>
+ <td>" . phpversion() . " (" . php_sapi_name() . ")</td>
+ </tr>
+ <tr>
+ <td>" . $dbr->getSoftwareLink() . ":</td>
+ <td>" . $dbr->getServerVersion() . "</td>
+ </tr>\n";
+ $ret .= Xml::closeElement( 'table' );
+
+ return $ret;
+ }
+
private function openExtType($text, $name = null) {
$opt = array( 'colspan' => 3 );
$out = '';
if(!$this->firstExtOpened) {
// Insert a spacing line
- $out .= '<tr class="sv-space">' . wfElement( 'td', $opt ) . "</tr>\n";
+ $out .= '<tr class="sv-space">' . Xml::tags( 'td', $opt, '' ) . "</tr>\n";
}
$this->firstExtOpened = false;
if($name) { $opt['id'] = "sv-$name"; }
- $out .= "<tr>" . wfElement( 'th', $opt, $text) . "</tr>\n";
+ $out .= "<tr>" . Xml::tags( 'th', $opt, $text) . "</tr>\n";
return $out;
}
* @return string
*/
function listToText( $list ) {
- $cnt = count( $list );
- if ( $cnt == 1 ) {
- // Enforce always returning a string
- return (string)$this->arrayToString( $list[0] );
- } elseif ( $cnt == 0 ) {
- return '';
+ if ( count( $list ) ) {
+ sort( $list );
+ return implode( ', ', $list );
} else {
- $t = array_slice( $list, 0, $cnt - 1 );
- $one = array_map( array( &$this, 'arrayToString' ), $t );
- $two = $this->arrayToString( $list[$cnt - 1] );
-
- return implode( ', ', $one ) . " and $two";
+ return '';
}
}
- /**
- * @static
- *
- * @param mixed $list Will convert an array to string if given and return
- * the paramater unaltered otherwise
- * @return mixed
- */
- function arrayToString( $list ) {
- if( is_object( $list ) ) {
- $class = get_class( $list );
- return "($class)";
- } elseif ( ! is_array( $list ) ) {
- return $list;
- } else {
- $class = get_class( $list[0] );
- return "($class, {$list[1]})";
- }
- }
-
/**
* Retrieve the revision number of a Subversion working directory.
*
'lag-warn-normal' => 'Bearbeitungen der letzten $1 Sekunden werden in dieser Liste noch nicht angezeigt.',
'lag-warn-high' => 'Auf Grund hoher Datenbankauslastung werden die Bearbeitungen der letzten $1 Sekunden in dieser Liste noch nicht angezeigt.',
+# Special:Version
+'version-extensions' => 'Installierte Erweiterungen',
+'version-specialpages' => 'Spezialseiten',
+'version-parserhooks' => 'Parser-Hooks',
+'version-variables' => 'Variablen',
+'version-other' => 'Anderes',
+'version-hooks' => "Schnittstellen ''(Hooks)''",
+'version-licence' => 'Lizenz-Informationen',
+'version-licence-header' => 'Unverbindliche Übersetzung:',
+'version-licence-text' => "
+ Dieses Wiki basiert auf '''[http://www.mediawiki.org/ MediaWiki]''',
+ die Urheberrechte (C) 2001-2007 liegen bei Magnus Manske, Brion Vibber, Lee Daniel Crocker,
+ Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason,
+ Niklas Laxström, Domas Mituzas, Rob Church und anderen.
+
+ MediaWiki ist eine freie Software; Sie dürfen sie weiterverteilen und/oder verändern,
+ sofern die Bedingungen der ''GNU General Public License'', veröffentlicht
+ durch die ''Free Software Foundation'' in Lizenzversion 2 oder
+ (nach Ihrer Wahl) jeder späteren Version, eingehalten werden.
+
+ MediaWiki wird verteilt in der Hoffnung, dass sie nutzbar ist,
+ aber OHNE JEDE GARANTIE, es wird auch keine implizite GEBRAUCHSTAUGLICHKEIT
+ oder TAUGLICHKEIT FÜR BESONDERE ZWECKE zugesagt.
+ Siehe die ''GNU General Public License'' für weitere Details.
+
+ Sie sollten eine [{{SERVER}}{{SCRIPTPATH}}/COPYING Kopie der ''GNU General Public License'']
+ zusammen mit dieser Software erhalten haben; falls diese fehlt, schreiben Sie an
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ oder [http://www.gnu.org/copyleft/gpl.html lesen Sie sie online].
+", # See [[Special:Version]] for the original licence text in English.
+'version-system' => 'System-Informationen',
+'version-extension-functions' => 'Funktionsaufrufe',
+'version-parser-extensiontags' => "Parser-Erweiterungen ''(tags)''",
+'version-parser-function-hooks' => 'Parser-Funktionen',
+'version-skin-extension-functions' => 'Skin extension functions',
+'version-hook-name' => 'Schnittstellenname',
+'version-hook-subscribedby' => 'aufgerufen durch',
+'version-software' => 'Software',
+'version-Version' => 'Version',
+
);
?>
'lag-warn-high' => 'Due to high database server lag, changes newer than $1 seconds
may not be shown in this list.',
+# Special:Version
+'version-extensions' => 'Installed extensions',
+'version-specialpages' => 'Special pages',
+'version-parserhooks' => 'Parser hooks',
+'version-variables' => 'Variables',
+'version-other' => 'Other',
+'version-hooks' => 'Hooks',
+'version-licence' => 'Licence information',
+'version-licence-header' => 'Translation without obligation:',
+'version-licence-text' => '-', # See [[Special:Version]] for the original licence text in English.
+'version-system' => 'System information',
+'version-extension-functions' => 'Extension functions',
+'version-parser-extensiontags' => 'Parser extension tags',
+'version-parser-function-hooks' => 'Parser function hooks',
+'version-skin-extension-functions' => 'Skin extension functions',
+'version-hook-name' => 'Hook name',
+'version-hook-subscribedby' => 'Subscribed by',
+'version-software' => 'Software',
+'version-version' => 'Version',
+
);
?>
'lag-warn-normal',
'lag-warn-high',
),
+ 'version' => array(
+ 'version-extensions',
+ 'version-specialpages',
+ 'version-parserhooks',
+ 'version-variables',
+ 'version-other',
+ 'version-hooks',
+ 'version-licence',
+ 'version-licence-header',
+ 'version-licence-text',
+ 'version-system',
+ 'version-extension-functions',
+ 'version-parser-extensiontags',
+ 'version-parser-function-hooks',
+ 'version-skin-extension-functions',
+ 'version-hook-name',
+ 'version-hook-subscribedby',
+ 'version-software',
+ 'version-version',
+ ),
);
/** Comments for each block */
$wgBlockComments = array(
'sizeunits' => 'Size units',
'livepreview' => 'Live preview',
'lagwarning' => 'Friendlier slave lag warnings',
+ 'version' => 'Special:Version',
);
/** Short comments for standalone messages */
'exif-orientation-7' => '0th row: right; 0th column: bottom',
'exif-orientation-8' => '0th row: left; 0th column: bottom',
'autoredircomment' => 'This should be changed to the new naming convention, but existed beforehand',
+ 'version-version' => 'See [[Special:Version]] for the original licence text in English.',
);
/** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */
/** Special:Version */
-table#sv-ext, table#sv-hooks {
+table#sv-ext, table#sv-hooks, table#sv-software {
margin: 1em;
padding:0em;
+ border-collapse: collapse;
}
-#sv-ext td, #sv-hooks td,
-#sv-ext th, #sv-hooks th {
+#sv-ext td, #sv-hooks td, #sv-software td
+#sv-ext th, #sv-hooks th, #sv-software th {
border: 1px solid #A0A0A0;
padding: 0 0.15em 0 0.15em;
}
-#sv-ext th, #sv-hooks th {
+#sv-ext th, #sv-hooks th, #sv-software th {
background-color: #F0F0F0;
color: black;
padding: 0 0.15em 0 0.15em;
/* Kill big bulky stuff that will clog up the screen */
display: none;
}
-}
\ No newline at end of file
+}
/** Special:Version */
-table#sv-ext, table#sv-hooks {
+table#sv-ext, table#sv-hooks, table#sv-software {
margin: 1em;
padding:0em;
+ border-collapse: collapse;
}
-#sv-ext td, #sv-hooks td,
-#sv-ext th, #sv-hooks th {
+#sv-ext td, #sv-hooks td, #sv-software td,
+#sv-ext th, #sv-hooks th, #sv-software th {
border: 1px solid #A0A0A0;
padding: 0 0.15em 0 0.15em;
}
-#sv-ext th, #sv-hooks th {
+#sv-ext th, #sv-hooks th, #sv-software th {
background-color: #F0F0F0;
color: black;
padding: 0 0.15em 0 0.15em;