Merge "EditPage: Implement 'editnotice-notext' message"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 19 Mar 2015 02:26:25 +0000 (02:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 19 Mar 2015 02:26:25 +0000 (02:26 +0000)
RELEASE-NOTES-1.25
includes/EditPage.php
languages/i18n/en.json
languages/i18n/qqq.json

index 88bfc15..00ce6b1 100644 (file)
@@ -115,6 +115,8 @@ production.
   interface, reachable via IContextSource::getStats().
 * Move the jQuery Client library from being mastered in MediaWiki as v0.1.0 to a
   proper, published library, which is now tagged as v1.0.0.
+* A new message (defaulting to blank), 'editnotice-notext', can be shown to users
+  when they are editing if no edit notices apply to the page being edited.
 
 ==== External libraries ====
 * MediaWiki now requires certain external libraries to be installed. In the past
index 5eb07d1..94ed903 100644 (file)
@@ -2555,7 +2555,19 @@ class EditPage {
                }
 
                // Add edit notices
-               $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices( $this->oldid ) ) );
+               $editNotices = $this->mTitle->getEditNotices( $this->oldid );
+               if ( count( $editNotices ) ) {
+                       $wgOut->addHTML( implode( "\n", $editNotices ) );
+               } else {
+                       $msg = wfMessage( 'editnotice-notext' );
+                       if ( !$msg->isDisabled() ) {
+                               $wgOut->addHTML(
+                                       '<div class="mw-editnotice-notext">'
+                                       . $msg->parseAsBlock()
+                                       . '</div>'
+                               );
+                       }
+               }
 
                if ( $this->isConflict ) {
                        $wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
index b40dadb..56bfbbc 100644 (file)
        "editingsection": "Editing $1 (section)",
        "editingcomment": "Editing $1 (new section)",
        "editconflict": "Edit conflict: $1",
+       "editnotice-notext": "-",
        "explainconflict": "Someone else has changed this page since you started editing it.\nThe upper text area contains the page text as it currently exists.\nYour changes are shown in the lower text area.\nYou will have to merge your changes into the existing text.\n<strong>Only</strong> the text in the upper text area will be saved when you press \"{{int:savearticle}}\".",
        "yourtext": "Your text",
        "storedversion": "Stored revision",
index 6ac333c..1484107 100644 (file)
        "editingsection": "This message displays at the top of the page when a user is editing a page section. Parameters:\n* $1 - page name\n{{Related|Editing}}",
        "editingcomment": "This message displays at the top of the page when a user is creating a new section. Parameters:\n* $1 - page name\n{{Related|Editing}}",
        "editconflict": "Used as title of error message. Parameters:\n* $1 - page title",
+       "editnotice-notext": "{{ignored}}\nCustom message on top of the edit page if no edit notices apply to this page.",
        "explainconflict": "Appears at the top of a page when there is an edit conflict.\n\nSee also:\n* {{msg-mw|Savearticle}}",
        "yourtext": "Used in Diff Preview page. The diff is between {{msg-mw|currentrev}} and {{msg-mw|yourtext}}.\n\nAlso used in Edit Conflict page; the diff between {{msg-mw|yourtext}} and {{msg-mw|storedversion}}.",
        "storedversion": "This is used in an edit conflict as the label for the top revision that has been stored, as opposed to your version {{msg-mw|yourtext}} that has not been stored which is shown at the bottom of the page.",