Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -816,7 +816,12 @@ |
817 | 817 | $this->returnToMain( false ); |
818 | 818 | } |
819 | 819 | |
820 | | - public function showPermissionsErrorPage( $title, $errors ) |
| 820 | + /** |
| 821 | + * Output a standard permission error page |
| 822 | + * |
| 823 | + * @param array $errors Error message keys |
| 824 | + */ |
| 825 | + public function showPermissionsErrorPage( $errors ) |
821 | 826 | { |
822 | 827 | global $wgTitle; |
823 | 828 | |
— | — | @@ -829,8 +834,6 @@ |
830 | 835 | $this->enableClientCache( false ); |
831 | 836 | $this->mRedirect = ''; |
832 | 837 | $this->mBodytext = ''; |
833 | | - |
834 | | - $this->addWikiText( wfMsg('permissionserrorstext') ); |
835 | 838 | $this->addWikitext( $this->formatPermissionsErrorMessage( $errors ) ); |
836 | 839 | } |
837 | 840 | |
— | — | @@ -956,7 +959,7 @@ |
957 | 960 | public function formatPermissionsErrorMessage( $errors ) { |
958 | 961 | $text = ''; |
959 | 962 | |
960 | | - $text .= wfMsg('permissionserrorstext')."\n"; |
| 963 | + $text .= wfMsgExt( 'permissionserrorstext', array( 'parse' ), count( $errors ) ) . "\n"; |
961 | 964 | $text .= '<ul class="permissions-errors">' . "\n"; |
962 | 965 | |
963 | 966 | foreach( $errors as $error ) |
Index: trunk/phase3/includes/SpecialMovepage.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | |
14 | 14 | # Check rights |
15 | 15 | if ( !$wgUser->isAllowed( 'move' ) ) { |
16 | | - $wgOut->showErrorPage( 'movenologin', 'movenologintext' ); |
| 16 | + $wgOut->showPermissionsErrorPage( array( $wgUser->isAnon() ? 'movenologintext' : 'movenotallowed' ) ); |
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -791,7 +791,7 @@ |
792 | 792 | $2", |
793 | 793 | 'namespaceprotected' => "You do not have permission to edit pages in the '''$1''' namespace.", |
794 | 794 | 'customcssjsprotected' => "You do not have permission to edit this page, because it contains another user's personal settings.", |
795 | | -'ns-specialprotected' => "Pages in the special namespace cannot be edited.", |
| 795 | +'ns-specialprotected' => "Pages in the {{ns:special}} namespace cannot be edited.", |
796 | 796 | |
797 | 797 | # Login and logout pages |
798 | 798 | 'logouttitle' => 'User logout', |
— | — | @@ -966,7 +966,7 @@ |
967 | 967 | 'blockedtext-concise' => "$7, which matches your username or IP address, has been blocked by $1. The reason given was $2. The expiry time of this block is $6. To discuss the block, you can |
968 | 968 | contact $1, or another administrator. You cannot use the 'email this user' feature unless a valid email address is specified in your account preferences and you have not been blocked from using it. |
969 | 969 | Your current IP address is $3, and the block ID is #$5. Please include either or both of these in any queries.", |
970 | | -'autoblockedtext-concise' => "Your IP address has recently been used by a user who was blocked. The block was made by $1. The reason given was $2. The expiry time of this block is $6. To |
| 970 | +'autoblockedtext-concise' => "Your IP address has recently been used by a user who was blocked. The block was made by $1. The reason given was $2. The expiry time of this block is $6. To |
971 | 971 | discuss the block, you can contact $1, or another administrator. You cannot use the 'email this user' feature unless a valid email address is specified in your account preferences and you have not |
972 | 972 | been blocked from using it. Your current IP address is $3, and the block ID is #$5. Please include either or both of these in any queries.", |
973 | 973 | 'blockedoriginalsource' => "The source of '''$1''' is |
— | — | @@ -2012,14 +2012,13 @@ |
2013 | 2013 | 'ipb-blocklist-addr' => 'View existing blocks for $1', |
2014 | 2014 | 'ipb-blocklist' => 'View existing blocks', |
2015 | 2015 | 'unblockip' => 'Unblock user', |
2016 | | -'unblockiptext' => 'Use the form below to restore write access |
2017 | | -to a previously blocked IP address or username.', |
| 2016 | +'unblockiptext' => 'Use the form below to restore write access to a previously blocked IP address or username.', |
2018 | 2017 | 'ipusubmit' => 'Unblock this address', |
2019 | 2018 | 'unblocked' => '[[User:$1|$1]] has been unblocked', |
2020 | 2019 | 'unblocked-id' => 'Block $1 has been removed', |
2021 | 2020 | 'ipblocklist' => 'List of blocked IP addresses and usernames', |
2022 | | -'ipblocklist-legend' => 'Find a blocked user', |
2023 | | -'ipblocklist-username' => 'Username or IP address:', |
| 2021 | +'ipblocklist-legend' => 'Find a blocked user', |
| 2022 | +'ipblocklist-username' => 'Username or IP address:', |
2024 | 2023 | 'ipblocklist-summary' => '', # only translate this message to other languages if you have to change it |
2025 | 2024 | 'ipblocklist-submit' => 'Search', |
2026 | 2025 | 'blocklistline' => '$1, $2 blocked $3 ($4)', |
— | — | @@ -2109,9 +2108,8 @@ |
2110 | 2109 | In those cases, you will have to move or merge the page manually if desired.", |
2111 | 2110 | 'movearticle' => 'Move page:', |
2112 | 2111 | 'movenologin' => 'Not logged in', |
2113 | | -'movenologintext' => 'You must be a registered user and [[Special:Userlogin|logged in]] |
2114 | | -to move a page.', |
2115 | | -'movenotallowed' => 'You do not have permission to move pages on this wiki.', |
| 2112 | +'movenologintext' => 'You must be a registered user and [[Special:Userlogin|logged in]] to move a page.', |
| 2113 | +'movenotallowed' => 'You do not have permission to move pages on this wiki.', |
2116 | 2114 | 'newtitle' => 'To new title:', |
2117 | 2115 | 'move-watch' => 'Watch this page', |
2118 | 2116 | 'movepagebtn' => 'Move page', |