From: Bartosz DziewoƄski Date: Fri, 27 Nov 2015 02:13:38 +0000 (+0100) Subject: SpecialMovepage: Use 'warningbox'/'errorbox' for warnings/errors X-Git-Tag: 1.31.0-rc.0~8131^2~1 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=6786c2183f2945f98063fe7ee07d78091dc2c676;p=lhc%2Fweb%2Fwiklou.git SpecialMovepage: Use 'warningbox'/'errorbox' for warnings/errors Matches the new form styling better. Also, remove headings in warning messages. Yeah, I don't know what was up with that, either. Change-Id: I84ce4d32c50f91cd64d4a1502e33b4cdbadfc5f3 --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 4bdad79f7e..27d2304ba1 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -149,22 +149,23 @@ class MovePageForm extends UnlistedSpecialPage { $out->addModuleStyles( 'mediawiki.special.movePage.styles' ); $this->addHelpLink( 'Help:Moving a page' ); + $out->addWikiMsg( $this->getConfig()->get( 'FixDoubleRedirects' ) ? + 'movepagetext' : + 'movepagetext-noredirectfixer' + ); + if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) { $out->wrapWikiMsg( - "
\n$1\n
", + "
\n$1\n
", 'moveuserpage-warning' ); } elseif ( $this->oldTitle->getNamespace() == NS_CATEGORY ) { $out->wrapWikiMsg( - "
\n$1\n
", + "
\n$1\n
", 'movecategorypage-warning' ); } - $out->addWikiMsg( $this->getConfig()->get( 'FixDoubleRedirects' ) ? - 'movepagetext' : - 'movepagetext-noredirectfixer' - ); $submitVar = 'wpMove'; $confirm = false; @@ -189,7 +190,10 @@ class MovePageForm extends UnlistedSpecialPage { if ( count( $err ) == 1 && isset( $err[0][0] ) && $err[0][0] == 'articleexists' && $newTitle->quickUserCan( 'delete', $user ) ) { - $out->addWikiMsg( 'delete_and_move_text', $newTitle->getPrefixedText() ); + $out->wrapWikiMsg( + "
\n$1\n
\n", + array( 'delete_and_move_text', $newTitle->getPrefixedText() ) + ); $submitVar = 'wpDeleteAndMove'; $confirm = true; $err = array(); @@ -198,7 +202,13 @@ class MovePageForm extends UnlistedSpecialPage { if ( count( $err ) == 1 && isset( $err[0][0] ) && $err[0][0] == 'file-exists-sharedrepo' && $user->isAllowed( 'reupload-shared' ) ) { - $out->addWikiMsg( 'move-over-sharedrepo', $newTitle->getPrefixedText() ); + $out->wrapWikiMsg( + "
\n$1\n
\n", + array( + 'move-over-sharedrepo', + $newTitle->getPrefixedText() + ) + ); $submitVar = 'wpMoveOverSharedFile'; $err = array(); } @@ -228,7 +238,7 @@ class MovePageForm extends UnlistedSpecialPage { } if ( count( $err ) ) { - $out->addHTML( "
\n" ); + $out->addHTML( "
\n" ); $action_desc = $this->msg( 'action-move' )->plain(); $out->addWikiMsg( 'permissionserrorstext-withaction', count( $err ), $action_desc ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index a54a88b11f..43fdbd9dab 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2398,8 +2398,8 @@ "move-page": "Move $1", "movepage-summary": "", "move-page-legend": "Move page", - "movepagetext": "Using the form below will rename a page, moving all of its history to the new name.\nThe old title will become a redirect page to the new title.\nYou can update redirects that point to the original title automatically.\nIf you choose not to, be sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nYou are responsible for making sure that links continue to point where they are supposed to go.\n\nNote that the page will not be moved if there is already a page at the new title, unless the latter is a redirect and has no past edit history.\nThis means that you can rename a page back to where it was renamed from if you make a mistake, and you cannot overwrite an existing page.\n\nWarning!\nThis can be a drastic and unexpected change for a popular page;\nplease be sure you understand the consequences of this before proceeding.", - "movepagetext-noredirectfixer": "Using the form below will rename a page, moving all of its history to the new name.\nThe old title will become a redirect page to the new title.\nBe sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nYou are responsible for making sure that links continue to point where they are supposed to go.\n\nNote that the page will not be moved if there is already a page at the new title, unless it is a redirect and has no past edit history.\nThis means that you can rename a page back to where it was renamed from if you make a mistake, and you cannot overwrite an existing page.\n\nWarning!\nThis can be a drastic and unexpected change for a popular page;\nplease be sure you understand the consequences of this before proceeding.", + "movepagetext": "Using the form below will rename a page, moving all of its history to the new name.\nThe old title will become a redirect page to the new title.\nYou can update redirects that point to the original title automatically.\nIf you choose not to, be sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nYou are responsible for making sure that links continue to point where they are supposed to go.\n\nNote that the page will not be moved if there is already a page at the new title, unless the latter is a redirect and has no past edit history.\nThis means that you can rename a page back to where it was renamed from if you make a mistake, and you cannot overwrite an existing page.\n\nNote:\nThis can be a drastic and unexpected change for a popular page;\nplease be sure you understand the consequences of this before proceeding.", + "movepagetext-noredirectfixer": "Using the form below will rename a page, moving all of its history to the new name.\nThe old title will become a redirect page to the new title.\nBe sure to check for [[Special:DoubleRedirects|double]] or [[Special:BrokenRedirects|broken redirects]].\nYou are responsible for making sure that links continue to point where they are supposed to go.\n\nNote that the page will not be moved if there is already a page at the new title, unless it is a redirect and has no past edit history.\nThis means that you can rename a page back to where it was renamed from if you make a mistake, and you cannot overwrite an existing page.\n\nNote:\nThis can be a drastic and unexpected change for a popular page;\nplease be sure you understand the consequences of this before proceeding.", "movepagetalktext": "If you check this box, the associated talk page will be automatically moved to new title, unless a non-empty talk page already exists there.\n\nIn this case, you will have to move or merge the page manually if desired.", "moveuserpage-warning": "Warning: You are about to move a user page. Please note that only the page will be moved and the user will not be renamed.", "movecategorypage-warning": "Warning: You are about to move a category page. Please note that only the page will be moved and any pages in the old category will not be recategorized into the new one.", @@ -2435,7 +2435,7 @@ "move-redirect-text": "", "category-move-redirect-override": "-", "revertmove": "revert", - "delete_and_move_text": "== Deletion required ==\nThe destination page \"[[:$1]]\" already exists.\nDo you want to delete it to make way for the move?", + "delete_and_move_text": "The destination page \"[[:$1]]\" already exists.\nDo you want to delete it to make way for the move?", "delete_and_move_confirm": "Yes, delete the page", "delete_and_move_reason": "Deleted to make way for move from \"[[$1]]\"", "selfmove": "Source and destination titles are the same;\ncannot move a page over itself.", @@ -2453,7 +2453,7 @@ "move-leave-redirect": "Leave a redirect behind", "protectedpagemovewarning": "Warning: This page has been protected so that only users with administrator privileges can move it.\nThe latest log entry is provided below for reference:", "semiprotectedpagemovewarning": "Note: This page has been protected so that only registered users can move it.\nThe latest log entry is provided below for reference:", - "move-over-sharedrepo": "== File exists ==\n[[:$1]] exists on a shared repository. Moving a file to this title will override the shared file.", + "move-over-sharedrepo": "[[:$1]] exists on a shared repository. Moving a file to this title will override the shared file.", "file-exists-sharedrepo": "The filename chosen is already in use on a shared repository.\nPlease choose another name.", "export": "Export pages", "export-summary": "",