Merge "Make Special:MovePage note about redirects dependent on content model"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 2 Aug 2019 08:45:12 +0000 (08:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 2 Aug 2019 08:45:12 +0000 (08:45 +0000)
includes/specials/SpecialMovepage.php
languages/i18n/en.json
languages/i18n/qqq.json

index ecbbc25..161b41a 100644 (file)
@@ -150,10 +150,16 @@ class MovePageForm extends UnlistedSpecialPage {
                $out->addModules( 'mediawiki.misc-authed-ooui' );
                $this->addHelpLink( 'Help:Moving a page' );
 
-               $out->addWikiMsg( $this->getConfig()->get( 'FixDoubleRedirects' ) ?
-                       'movepagetext' :
-                       'movepagetext-noredirectfixer'
-               );
+               $handlerSupportsRedirects = ContentHandler::getForTitle( $this->oldTitle )
+                       ->supportsRedirects();
+
+               if ( $this->getConfig()->get( 'FixDoubleRedirects' ) ) {
+                       $out->addWikiMsg( 'movepagetext' );
+               } else {
+                       $out->addWikiMsg( $handlerSupportsRedirects ?
+                               'movepagetext-noredirectfixer' :
+                               'movepagetext-noredirectsupport' );
+               }
 
                if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
                        $out->wrapWikiMsg(
@@ -306,8 +312,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        }
                }
 
-               $handler = ContentHandler::getForTitle( $this->oldTitle );
-
                $out->enableOOUI();
                $fields = [];
 
@@ -371,7 +375,7 @@ class MovePageForm extends UnlistedSpecialPage {
                }
 
                if ( $user->isAllowed( 'suppressredirect' ) ) {
-                       if ( $handler->supportsRedirects() ) {
+                       if ( $handlerSupportsRedirects ) {
                                $isChecked = $this->leaveRedirect;
                                $isDisabled = false;
                        } else {
index 9988341..5b220a9 100644 (file)
        "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 <strong>not</strong> 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\n<strong>Note:</strong>\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 <strong>not</strong> 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\n<strong>Note:</strong>\nThis can be a drastic and unexpected change for a popular page;\nplease be sure you understand the consequences of this before proceeding.",
+       "movepagetext-noredirectsupport": "Using the form below will rename a page, moving all of its history to the new name.\nYou are responsible for making sure that links continue to point where they are supposed to go.\n\nNote that the page will <strong>not</strong> be moved if there is already a page at the new title.\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\n<strong>Note:</strong>\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": "<strong>Warning:</strong> You are about to move a user page. Please note that only the page will be moved and the user will <em>not</em> be renamed.",
        "movecategorypage-warning": "<strong>Warning:</strong> 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 <em>not</em> be recategorized into the new one.",
index f0eeaa4..1a507be 100644 (file)
        "move-page-legend": "Legend of the fieldset around the input form of [[Special:MovePage/testpage]].\n\nSee also:\n* {{msg-mw|newtitle|label for new title}}\n* {{msg-mw|movereason|label for textarea}}\n* {{msg-mw|movetalk|label for checkbox}}\n* {{msg-mw|move-leave-redirect|label for checkbox}}\n* {{msg-mw|fix-double-redirects|label for checkbox}}\n* {{msg-mw|move-subpages|label for checkbox}}\n* {{msg-mw|move-talk-subpages|label for checkbox}}\n* {{msg-mw|move-watch|label for checkbox}}\n{{Identical|Move page}}",
        "movepagetext": "Introduction shown when moving a page ([[Special:MovePage]]).\n\nSpecial pages mentioned: {{msg-mw|Doubleredirects}}, {{msg-mw|Brokenredirects}}\n\nSee also:\n* {{msg-mw|Movepagetext-noredirectfixer}}",
        "movepagetext-noredirectfixer": "A variant of the following message ''Movepagetext'' displayed when the automatic redirect fixer is not enabled.\n\nSpecial pages mentioned: {{msg-mw|Doubleredirects}}, {{msg-mw|Brokenredirects}}\n\nSee also:\n* {{msg-mw|Movepagetext}}",
+       "movepagetext-noredirectsupport": "A variant of the following message ''Movepagetext'' displayed when the content model of the page being moved does not support redirects.\n\nSee also:\n* {{msg-mw|Movepagetext}}",
        "movepagetalktext": "Text on the special 'Move page'. This text only appears if the talk page is not empty.",
        "moveuserpage-warning": "Used as warning in [[Special:MovePage]], when moving a user page.",
        "movecategorypage-warning": "Used as warning in [[Special:MovePage]], when moving a category page.",