From df547cba19950917a87be4135f3cbe54fd37b20d Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 10 Aug 2010 16:21:10 +0000 Subject: [PATCH] Make the subtitle of Special:Watchlist more consistent with other subtitles. Enclose tool links by s span with a class. Especially I see no need for the extra linebreak --- includes/WatchlistEditor.php | 11 +++++------ includes/specials/SpecialWatchlist.php | 3 +-- languages/messages/MessagesEn.php | 2 +- languages/messages/MessagesQqq.php | 3 ++- maintenance/language/messages.inc | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 638b47a4b7..1f10a85d74 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -503,14 +503,13 @@ class WatchlistEditor { $modes = array( 'view' => false, 'edit' => 'edit', 'raw' => 'raw' ); foreach( $modes as $mode => $subpage ) { // can use messages 'watchlisttools-view', 'watchlisttools-edit', 'watchlisttools-raw' - $tools[] = $skin->link( + $tools[] = $skin->linkKnown( SpecialPage::getTitleFor( 'Watchlist', $subpage ), - wfMsgHtml( "watchlisttools-{$mode}" ), - array(), - array(), - array( 'known', 'noclasses' ) + wfMsgHtml( "watchlisttools-{$mode}" ) ); } - return $wgLang->pipeList( $tools ); + return Html::rawElement( 'span', + array( 'class' => 'mw-watchlist-toollinks' ), + wfMsg( 'parentheses', $wgLang->pipeList( $tools ) ) ); } } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 52ac4a500f..ec230a2c4f 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -66,8 +66,7 @@ function wfSpecialWatchlist( $par ) { $wgOut->setPageTitle( wfMsg( 'watchlist' ) ); - $sub = wfMsgExt( 'watchlistfor', 'parseinline', $wgUser->getName() ); - $sub .= '
' . WatchlistEditor::buildTools( $wgUser->getSkin() ); + $sub = wfMsgExt( 'watchlistfor2', array( 'parseinline', 'replaceafter' ), $wgUser->getName(), WatchlistEditor::buildTools( $wgUser->getSkin() ) ); $wgOut->setSubtitle( $sub ); if( ( $mode = WatchlistEditor::getMode( $wgRequest, $par ) ) !== false ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 637baddb9f..674972af0b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2661,7 +2661,7 @@ The e-mail address you entered in [[Special:Preferences|your user preferences]] # Watchlist 'watchlist' => 'My watchlist', 'mywatchlist' => 'My watchlist', -'watchlistfor' => "(for '''$1''')", +'watchlistfor2' => 'For $1 $2', 'nowatchlist' => 'You have no items on your watchlist.', 'watchlistanontext' => 'Please $1 to view or edit items on your watchlist.', 'watchnologin' => 'Not logged in', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 3a2a2037d1..c43d81e0f7 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2280,9 +2280,10 @@ Special:EmailUser appears when you click on the link "E-mail this user" in the s 'mywatchlist' => 'Link at the upper right corner of the screen. {{Identical|My watchlist}}', -'watchlistfor' => 'Subtitle on [[Special:Watchlist]]. +'watchlistfor2' => 'Subtitle on [[Special:Watchlist]]. *$1: Username of current user +*$2: Tool links (View relevant changes | View and edit watchlist | Edit raw watchlist) {{Identical|For $1}}', 'nowatchlist' => 'Displayed when there is no pages in the watchlist.', 'watchlistanontext' => '* $1 is a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 2367e379cf..ee8cfedd48 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1746,7 +1746,7 @@ $wgMessageStructure = array( 'watchlist' => array( 'watchlist', 'mywatchlist', - 'watchlistfor', + 'watchlistfor2', 'nowatchlist', 'watchlistanontext', 'watchnologin', -- 2.20.1