From: Victor Vasiliev Date: Sun, 11 Nov 2007 15:55:17 +0000 (+0000) Subject: Some minor fixes: X-Git-Tag: 1.31.0-rc.0~50916 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=95cd6956211a1dbe25bb350f94b0f3326ce0159c;p=lhc%2Fweb%2Fwiklou.git Some minor fixes: * Renamed ot=raw to ot=xml * Added tooltip to randomincategory link on sidebar --- diff --git a/includes/SpecialAllmessages.php b/includes/SpecialAllmessages.php index d8b6acc27f..d44036f214 100644 --- a/includes/SpecialAllmessages.php +++ b/includes/SpecialAllmessages.php @@ -45,12 +45,13 @@ function wfSpecialAllmessages() { wfProfileIn( __METHOD__ . '-output' ); if ( $ot == 'php' ) { $navText .= makePhp( $messages ); - $wgOut->addHTML( 'PHP | HTML | Raw
' . htmlspecialchars( $navText ) . '
' ); - } else if ( $ot == 'raw' ) { + $wgOut->addHTML( 'PHP | HTML | XML
' . htmlspecialchars( $navText ) . '
' ); + } else if ( $ot == 'xml' ) { $wgOut->disable(); - echo makeRaw( $messages ); + header( 'Content-type: text/xml' ); + echo makeXml( $messages ); } else { - $wgOut->addHTML( 'PHP | HTML | Raw' ); + $wgOut->addHTML( 'PHP | HTML | XML' ); $wgOut->addWikiText( $navText ); $wgOut->addHTML( makeHTMLText( $messages ) ); } @@ -59,13 +60,13 @@ function wfSpecialAllmessages() { wfProfileOut( __METHOD__ ); } -function makeRaw( $messages ) { +function makeXml( $messages ) { global $wgLang; $lang = $wgLang->getCode(); $txt = "\n"; $txt .= "\n"; foreach( $messages as $key => $m ) { - $txt .= "\t" . htmlspecialchars( "{$m['msg']}" ) . "\n"; + $txt .= "\t" . Xml::element( 'message', array( 'name' => $key ), $m['msg'] ) . "\n"; } $txt .= ""; return $txt; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ca9cdc7437..052cf73da8 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2294,6 +2294,7 @@ All transwiki import actions are logged at the [[Special:Log/import|import log]] 'accesskey-n-sitesupport' => '', # don't translate or duplicate this message to other languages 'accesskey-t-whatlinkshere' => 'j', # don't translate or duplicate this message to other languages 'accesskey-t-recentchangeslinked' => 'k', # don't translate or duplicate this message to other languages +'accesskey-t-random' => '', # don't translate or duplicate this message to other languages 'accesskey-feed-rss' => '', # don't translate or duplicate this message to other languages 'accesskey-feed-atom' => '', # don't translate or duplicate this message to other languages 'accesskey-t-contributions' => '', # don't translate or duplicate this message to other languages @@ -2355,6 +2356,7 @@ All transwiki import actions are logged at the [[Special:Log/import|import log]] 'tooltip-n-sitesupport' => 'Support us', 'tooltip-t-whatlinkshere' => 'List of all wiki pages that link here', 'tooltip-t-recentchangeslinked' => 'Recent changes in pages linked from this page', +'tooltip-t-random' => 'Random page in this category', 'tooltip-feed-rss' => 'RSS feed for this page', 'tooltip-feed-atom' => 'Atom feed for this page', 'tooltip-t-contributions' => 'View the list of contributions of this user', diff --git a/skins/MonoBook.php b/skins/MonoBook.php index fcf7d4bf1d..1ebe71df02 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -224,7 +224,7 @@ class MonoBookTemplate extends QuickTemplate { if(!empty($this->data['nav_urls']['randomincategory']['href'])) { ?>
  • tooltipAndAccesskey('t-print') ?>>msg('randomincategory-toolbox') ?>
  • "tooltipAndAccesskey('t-random') ?>>msg('randomincategory-toolbox') ?>