SpecialMovepage: Don't change button text when moving over existing page
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 27 Nov 2015 01:29:51 +0000 (02:29 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 30 Nov 2015 15:36:32 +0000 (16:36 +0100)
The button text was being changed from "Move" to "Delete and move". This
is no longer necessary after a confirmation checkbox "Yes, delete the page"
was implemented in ac563af7e7489e701b6b68756fb7b10ed058d07d (r12433).

Change-Id: Ie8e25ab3d11e75f47f4cf1a4ec96407d3f37b547

includes/specials/SpecialMovepage.php
languages/i18n/en.json
languages/i18n/qqq.json

index fd2f4c7..e9fb75b 100644 (file)
@@ -162,7 +162,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        'movepagetext' :
                        'movepagetext-noredirectfixer'
                );
-               $movepagebtn = $this->msg( 'movepagebtn' )->text();
                $submitVar = 'wpMove';
                $confirm = false;
 
@@ -188,7 +187,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        && $newTitle->quickUserCan( 'delete', $user )
                ) {
                        $out->addWikiMsg( 'delete_and_move_text', $newTitle->getPrefixedText() );
-                       $movepagebtn = $this->msg( 'delete_and_move' )->text();
                        $submitVar = 'wpDeleteAndMove';
                        $confirm = true;
                        $err = array();
@@ -446,8 +444,8 @@ class MovePageForm extends UnlistedSpecialPage {
                $fields[] = new OOUI\FieldLayout(
                        new OOUI\ButtonInputWidget( array(
                                'name' => $submitVar,
-                               'value' => $movepagebtn,
-                               'label' => $movepagebtn,
+                               'value' => $this->msg( 'movepagebtn' )->text(),
+                               'label' => $this->msg( 'movepagebtn' )->text(),
                                'flags' => array( 'constructive', 'primary' ),
                                'type' => 'submit',
                        ) ),
index a274fac..4bec8e2 100644 (file)
        "move-redirect-text": "",
        "category-move-redirect-override": "-",
        "revertmove": "revert",
-       "delete_and_move": "Delete and move",
        "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_confirm": "Yes, delete the page",
        "delete_and_move_reason": "Deleted to make way for move from \"[[$1]]\"",
index bd3776e..4c1146e 100644 (file)
        "move-redirect-text": "{{ignored}}The text that's added to a redirected page when that redirect is created.",
        "category-move-redirect-override": "{{ignored}}The text that's added to a redirected category page when that redirect is created.",
        "revertmove": "{{Identical|Revert}}",
-       "delete_and_move": "Button text on the move page when the target page already exists.",
        "delete_and_move_text": "Used when moving a page, but the destination page already exists and needs deletion.\n\nThis message is to confirm that you really want to delete the page.\n\nParameters:\n* $1 - the destination page title\n\nSee also:\n* {{msg-mw|Delete and move confirm}}",
        "delete_and_move_confirm": "Used when moving a page, but the destination page already exists and needs deletion.\n\nThis message is for a checkbox to confirm that you really want to delete the page.\n\nSee also:\n* {{msg-mw|Delete and move text}}",
        "delete_and_move_reason": "Shown as reason in content language in the deletion log. Parameter:\n* $1 - The page name for which this page was deleted.",