Make show/hide links in watchlist consistent to recent changes (and ipblocklist too).
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 3 Nov 2008 17:45:38 +0000 (17:45 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 3 Nov 2008 17:45:38 +0000 (17:45 +0000)
Use the same messages for RC/WL to keep translations consistent.

includes/specials/SpecialWatchlist.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 7cf4879..737d7f3 100644 (file)
@@ -250,38 +250,40 @@ function wfSpecialWatchlist( $par ) {
        $thisTitle = SpecialPage::getTitleFor( 'Watchlist' );
        $skin = $wgUser->getSkin();
 
+       $showLinktext = wfMsgHtml( 'show' );
+       $hideLinktext = wfMsgHtml( 'hide' );
        # Hide/show minor edits
-       $label = $hideMinor ? wfMsgHtml( 'watchlist-show-minor' ) : wfMsgHtml( 'watchlist-hide-minor' );
+       $label = $hideMinor ? $showLinktext : $hideLinktext;
        $linkBits = wfArrayToCGI( array( 'hideMinor' => 1 - (int)$hideMinor ), $nondefaults );
-       $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+       $links[] = wfMsgHtml( 'rcshowhideminor', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
 
        # Hide/show bot edits
-       $label = $hideBots ? wfMsgHtml( 'watchlist-show-bots' ) : wfMsgHtml( 'watchlist-hide-bots' );
+       $label = $hideBots ? $showLinktext : $hideLinktext;
        $linkBits = wfArrayToCGI( array( 'hideBots' => 1 - (int)$hideBots ), $nondefaults );
-       $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+       $links[] = wfMsgHtml( 'rcshowhidebots', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
 
        # Hide/show anonymous edits
-       $label = $hideAnons ? wfMsgHtml( 'watchlist-show-anons' ) : wfMsgHtml( 'watchlist-hide-anons' );
+       $label = $hideAnons ? $showLinktext : $hideLinktext;
        $linkBits = wfArrayToCGI( array( 'hideAnons' => 1 - (int)$hideAnons ), $nondefaults );
-       $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+       $links[] = wfMsgHtml( 'rcshowhideanons', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
 
        # Hide/show logged in edits
-       $label = $hideLiu ? wfMsgHtml( 'watchlist-show-liu' ) : wfMsgHtml( 'watchlist-hide-liu' );
+       $label = $hideLiu ? $showLinktext : $hideLinktext;
        $linkBits = wfArrayToCGI( array( 'hideLiu' => 1 - (int)$hideLiu ), $nondefaults );
-       $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+       $links[] = wfMsgHtml( 'rcshowhideliu', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
 
        # Hide/show own edits
-       $label = $hideOwn ? wfMsgHtml( 'watchlist-show-own' ) : wfMsgHtml( 'watchlist-hide-own' );
+       $label = $hideOwn ? $showLinktext : $hideLinktext;
        $linkBits = wfArrayToCGI( array( 'hideOwn' => 1 - (int)$hideOwn ), $nondefaults );
-       $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
-       
+       $links[] = wfMsgHtml( 'rcshowhidemine', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
+
        # Hide/show patrolled edits
        if( $wgUser->useRCPatrol() ) {
-               $label = $hidePatrolled ? wfMsgHtml( 'watchlist-show-patrolled' ) : wfMsgHtml( 'watchlist-hide-patrolled' );
+               $label = $hidePatrolled ? $showLinktext : $hideLinktext;
                $linkBits = wfArrayToCGI( array( 'hidePatrolled' => 1 - (int)$hidePatrolled ), $nondefaults );
-               $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+               $links[] = wfMsgHtml( 'rcshowhidepatr', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) );
        }
-       
+
        # Namespace filter and put the whole form together.
        $form .= $wlInfo;
        $form .= $cutofflinks;
index 63b6fed..b5bd7bd 100644 (file)
@@ -2254,18 +2254,6 @@ Future changes to this page and its associated talk page will be listed there, a
 'iteminvalidname'          => "Problem with item '$1', invalid name...",
 'wlnote'                   => "Below {{PLURAL:$1|is the last change|are the last '''$1''' changes}} in the last {{PLURAL:$2|hour|'''$2''' hours}}.",
 'wlshowlast'               => 'Show last $1 hours $2 days $3',
-'watchlist-show-bots'      => 'Show bot edits',
-'watchlist-hide-bots'      => 'Hide bot edits',
-'watchlist-show-own'       => 'Show my edits',
-'watchlist-hide-own'       => 'Hide my edits',
-'watchlist-show-minor'     => 'Show minor edits',
-'watchlist-hide-minor'     => 'Hide minor edits',
-'watchlist-show-anons'     => 'Show anonymous edits',
-'watchlist-hide-anons'     => 'Hide anonymous edits',
-'watchlist-show-liu'       => 'Show logged-in user edits',
-'watchlist-hide-liu'       => 'Hide logged-in user edits',
-'watchlist-show-patrolled' => 'Show patrolled edits',
-'watchlist-hide-patrolled' => 'Hide patrolled edits',
 'watchlist-options'        => 'Watchlist options',
 
 # Displayed when you click the "watch" button and it is in the process of watching
index d1a11f6..060f23c 100644 (file)
@@ -1514,18 +1514,6 @@ $wgMessageStructure = array(
                'iteminvalidname',
                'wlnote',
                'wlshowlast',
-               'watchlist-show-bots',
-               'watchlist-hide-bots',
-               'watchlist-show-own',
-               'watchlist-hide-own',
-               'watchlist-show-minor',
-               'watchlist-hide-minor',
-               'watchlist-show-anons',
-               'watchlist-hide-anons',
-               'watchlist-show-liu',
-               'watchlist-hide-liu',
-               'watchlist-show-patrolled',
-               'watchlist-hide-patrolled',
                'watchlist-options',
        ),
        'watching' => array(