(bug 15301) Fix up use of actions in display for permissions errors.
authorAndrew Garrett <werdna@users.mediawiki.org>
Mon, 6 Oct 2008 09:16:20 +0000 (09:16 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Mon, 6 Oct 2008 09:16:20 +0000 (09:16 +0000)
includes/OutputPage.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index e571c8e..c2ce992 100644 (file)
@@ -1185,8 +1185,7 @@ class OutputPage {
                        $text = wfMsgNoTrans( 'permissionserrorstext', count($errors)). "\n\n";
                } else {
                        global $wgLang;
-                       $action_desc = wfMsg( "right-$action" );
-                       $action_desc = $wgLang->lcfirst( $action_desc ); // FIXME: TERRIBLE HACK
+                       $action_desc = wfMsg( "action-$action" );
                        $text = wfMsgNoTrans( 'permissionserrorstext-withaction', count($errors), $action_desc ) . "\n\n";
                }
 
index be33dc3..8d78643 100644 (file)
@@ -1643,6 +1643,40 @@ please see math/README to configure.',
 'right-userrights-interwiki' => 'Edit user rights of users on other wikis',
 'right-siteadmin'            => 'Lock and unlock the database',
 
+# Associated actions - in the sentence "You don't have permission to X"
+'action-read'                 => 'read this page',
+'action-edit'                 => 'edit this page',
+'action-createpage'           => 'create pages',
+'action-createtalk'           => 'create discussion pages',
+'action-createaccount'        => 'create this user account',
+'action-minoredit'            => 'mark this edit as minor',
+'action-move'                 => 'move this page',
+'action-move-subpages'        => 'move this page, and its subpages',
+'action-upload'               => 'upload this file',
+'action-reupload'             => 'overwrite this existing file',
+'action-reupload-shared'      => 'override this file on a shared repository',
+'action-upload_by_url'        => 'upload this file from a URL address',
+'action-writeapi'             => 'use the write API',
+'action-delete'               => 'delete this page',
+'action-deleterevision'       => 'delete this revision',
+'action-deletedhistory'       => "view this page's deleted history",
+'action-browsearchive'        => 'search deleted pages',
+'action-undelete'             => 'undelete this page',
+'action-suppressrevision'     => 'review and restore this hidden revision',
+'action-suppressionlog'       => 'view this private log',
+'action-block'                => 'block this user from editing',
+'action-protect'              => 'change protection levels for this page',
+'action-import'               => 'import this page from another wiki',
+'action-importupload'         => 'import this page from a file upload',
+'action-patrol'               => "mark others' edit as patrolled",
+'action-autopatrol'           => "have your edit marked as patrolled",
+'action-unwatchedpages'       => 'view the list of unwatched pages',
+'action-trackback'            => 'submit a trackback',
+'action-mergehistory'         => 'merge the history of this page',
+'action-userrights'           => 'edit all user rights',
+'action-userrights-interwiki' => 'edit user rights of users on other wikis',
+'action-siteadmin'            => 'lock or unlock the database',
+
 # User rights log
 'rightslog'      => 'User rights log',
 'rightslogtext'  => 'This is a log of changes to user rights.',
index 8c90b2f..270f65d 100644 (file)
@@ -971,6 +971,39 @@ $wgMessageStructure = array(
                'rightslogentry',
                'rightsnone',
        ),
+       'action' => array(
+               'action-read',
+               'action-edit',
+               'action-createpage',
+               'action-createtalk',
+               'action-createaccount',
+               'action-minoredit',
+               'action-move',
+               'action-move-subpages',
+               'action-upload',
+               'action-reupload',
+               'action-reupload-shared',
+               'action-upload_by_url',
+               'action-writeapi',
+               'action-delete',
+               'action-deleterevision',
+               'action-deletedhistory',
+               'action-browsearchive',
+               'action-undelete',
+               'action-suppressrevision',
+               'action-suppressionlog',
+               'action-block',
+               'action-protect',
+               'action-import',
+               'action-importupload',
+               'action-patrol',
+               'action-autopatrol',
+               'action-unwatchedpages',
+               'action-trackback',
+               'action-mergehistory',
+               'action-userrights',
+               'action-userrights-interwiki',
+       ),
        'recentchanges' => array(
                'nchanges',
                'recentchanges',