r70832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70831‎ | r70832 | r70833 >
Date:16:21, 10 August 2010
Author:raymond
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1746,7 +1746,7 @@
17471747 'watchlist' => array(
17481748 'watchlist',
17491749 'mywatchlist',
1750 - 'watchlistfor',
 1750+ 'watchlistfor2',
17511751 'nowatchlist',
17521752 'watchlistanontext',
17531753 'watchnologin',
Index: trunk/phase3/includes/WatchlistEditor.php
@@ -503,14 +503,13 @@
504504 $modes = array( 'view' => false, 'edit' => 'edit', 'raw' => 'raw' );
505505 foreach( $modes as $mode => $subpage ) {
506506 // can use messages 'watchlisttools-view', 'watchlisttools-edit', 'watchlisttools-raw'
507 - $tools[] = $skin->link(
 507+ $tools[] = $skin->linkKnown(
508508 SpecialPage::getTitleFor( 'Watchlist', $subpage ),
509 - wfMsgHtml( "watchlisttools-{$mode}" ),
510 - array(),
511 - array(),
512 - array( 'known', 'noclasses' )
 509+ wfMsgHtml( "watchlisttools-{$mode}" )
513510 );
514511 }
515 - return $wgLang->pipeList( $tools );
 512+ return Html::rawElement( 'span',
 513+ array( 'class' => 'mw-watchlist-toollinks' ),
 514+ wfMsg( 'parentheses', $wgLang->pipeList( $tools ) ) );
516515 }
517516 }
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -66,8 +66,7 @@
6767
6868 $wgOut->setPageTitle( wfMsg( 'watchlist' ) );
6969
70 - $sub = wfMsgExt( 'watchlistfor', 'parseinline', $wgUser->getName() );
71 - $sub .= '<br />' . WatchlistEditor::buildTools( $wgUser->getSkin() );
 70+ $sub = wfMsgExt( 'watchlistfor2', array( 'parseinline', 'replaceafter' ), $wgUser->getName(), WatchlistEditor::buildTools( $wgUser->getSkin() ) );
7271 $wgOut->setSubtitle( $sub );
7372
7473 if( ( $mode = WatchlistEditor::getMode( $wgRequest, $par ) ) !== false ) {
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -2280,9 +2280,10 @@
22812281 'mywatchlist' => 'Link at the upper right corner of the screen.
22822282
22832283 {{Identical|My watchlist}}',
2284 -'watchlistfor' => 'Subtitle on [[Special:Watchlist]].
 2284+'watchlistfor2' => 'Subtitle on [[Special:Watchlist]].
22852285
22862286 *$1: Username of current user
 2287+*$2: Tool links (View relevant changes | View and edit watchlist | Edit raw watchlist)
22872288 {{Identical|For $1}}',
22882289 'nowatchlist' => 'Displayed when there is no pages in the watchlist.',
22892290 'watchlistanontext' => '* $1 is a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2661,7 +2661,7 @@
26622662 # Watchlist
26632663 'watchlist' => 'My watchlist',
26642664 'mywatchlist' => 'My watchlist',
2665 -'watchlistfor' => "(for '''$1''')",
 2665+'watchlistfor2' => 'For $1 $2',
26662666 'nowatchlist' => 'You have no items on your watchlist.',
26672667 'watchlistanontext' => 'Please $1 to view or edit items on your watchlist.',
26682668 'watchnologin' => 'Not logged in',

Status & tagging log