Update Special:BrokenRedirects:
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 13 Jun 2009 00:02:31 +0000 (00:02 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 13 Jun 2009 00:02:31 +0000 (00:02 +0000)
* add a message 'parentheses' "($1)" so a parentheses enclosed list can be localised (hardcoded all over the place)
* put edit and delete link in parentheses together (changed messages 'brokenredirects-delete' and 'brokenredirects-edit')
* convert deprecated makeBrokenLinkObj() to link()
* update indendation

includes/specials/SpecialBrokenRedirects.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 01f0bd9..b6ae2ad 100644 (file)
@@ -33,9 +33,9 @@ class BrokenRedirectsPage extends PageQueryPage {
                                rd_namespace,
                                rd_title
                           FROM $redirect AS rd
-                   JOIN $page p1 ON (rd.rd_from=p1.page_id)
+                     JOIN $page p1 ON (rd.rd_from=p1.page_id)
                      LEFT JOIN $page AS p2 ON (rd_namespace=p2.page_namespace AND rd_title=p2.page_title )
-                                 WHERE rd_namespace >= 0
+                                 WHERE rd_namespace >= 0
                                    AND p2.page_namespace IS NULL";
                return $sql;
        }
@@ -45,7 +45,7 @@ class BrokenRedirectsPage extends PageQueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgUser, $wgContLang;
+               global $wgUser, $wgContLang, $wgLang;
 
                $fromObj = Title::makeTitle( $result->namespace, $result->title );
                if ( isset( $result->rd_title ) ) {
@@ -70,27 +70,34 @@ class BrokenRedirectsPage extends PageQueryPage {
                        array(),
                        array( 'redirect' => 'no' )
                );
-               $edit = $skin->linkKnown(
+               $links = array();
+               $links[] = $skin->linkKnown(
                        $fromObj,
                        wfMsgHtml( 'brokenredirects-edit' ),
                        array(),
                        array( 'action' => 'edit' )
                );
-               $to   = $skin->makeBrokenLinkObj( $toObj );
+               $to   = $skin->link(
+                       $toObj,
+                       null,
+                       array(),
+                       array(),
+                       array( 'broken' )
+               );
                $arr = $wgContLang->getArrow();
 
-               $out = "{$from} {$edit}";
+               $out = $from . wfMsg( 'word-separator' );
 
                if( $wgUser->isAllowed( 'delete' ) ) {
-                       $delete = $skin->linkKnown(
+                       $links[] = $skin->linkKnown(
                                $fromObj,
                                wfMsgHtml( 'brokenredirects-delete' ),
                                array(),
                                array( 'action' => 'delete' )
                        );
-                       $out .= " {$delete}";
                }
 
+               $out .= wfMsg( 'parentheses', $wgLang->pipeList( $links ) );
                $out .= " {$arr} {$to}";
                return $out;
        }
index f4d58a6..a549bc1 100644 (file)
@@ -2152,8 +2152,8 @@ It now redirects to [[$2]].',
 'brokenredirects'         => 'Broken redirects',
 'brokenredirects-summary' => '', # do not translate or duplicate this message to other languages
 'brokenredirectstext'     => 'The following redirects link to non-existent pages:',
-'brokenredirects-edit'    => '(edit)',
-'brokenredirects-delete'  => '(delete)',
+'brokenredirects-edit'    => 'edit',
+'brokenredirects-delete'  => 'delete',
 
 'withoutinterwiki'         => 'Pages without language links',
 'withoutinterwiki-summary' => 'The following pages do not link to other language versions.',
@@ -3709,6 +3709,7 @@ Please confirm that you really want to recreate this page.",
 'word-separator'      => '&#32;', # only translate this message to other languages if you have to change it
 'ellipsis'            => '...', # only translate this message to other languages if you have to change it
 'percent'             => '$1%', # only translate this message to other languages if you have to change it
+'parentheses'         => '($1)', # only translate this message to other languages if you have to change it
 
 # Multipage image navigation
 'imgmultipageprev' => '← previous page',
index 2e3d2cf..0d985f5 100644 (file)
@@ -332,6 +332,7 @@ $wgOptionalMessages = array(
        'word-separator',
        'ellipsis',
        'percent',
+       'parentheses',
        'autocomment-prefix',
        'listgrouprights-right-display',
        'timezone-utc',
index 5eeefab..2c1c3ad 100644 (file)
@@ -2812,6 +2812,7 @@ $wgMessageStructure = array(
                'word-separator',
                'ellipsis',
                'percent',
+               'parentheses',
        ),
        'imgmulti' => array(
                'imgmultipageprev',