From d71a1a4b48d2d0fe02332ebbcb0d1e697e97e1cf Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 6 Oct 2008 09:16:20 +0000 Subject: [PATCH] (bug 15301) Fix up use of actions in display for permissions errors. --- includes/OutputPage.php | 3 +-- languages/messages/MessagesEn.php | 34 +++++++++++++++++++++++++++++++ maintenance/language/messages.inc | 33 ++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e571c8ed54..c2ce99202a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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"; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index be33dc3bbb..8d7864344b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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.', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 8c90b2ff70..270f65d1b0 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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', -- 2.20.1