Use successbox/errorbox instead of bolded text on revision delete form
authorThis, that and the other <at.light@live.com.au>
Tue, 21 Apr 2015 07:17:23 +0000 (17:17 +1000)
committerThis, that and the other <at.light@live.com.au>
Tue, 21 Apr 2015 07:17:23 +0000 (17:17 +1000)
Same idea as I596cbdc2.

* Avoid style markup in i18n messages. Use successbox instead of
  <strong> inside a message in a span.
* Consistency with rest of MediaWiki (e.g. Special:Preferences).
* Make error look like an error. It was previously output in a plain
  paragraph with no styling or other indication.

Change-Id: Ia2f8d56edbd72632d02c6738841340b28cc6d773

includes/specials/SpecialRevisiondelete.php
languages/i18n/en.json

index bdfe911..62025e7 100644 (file)
@@ -606,7 +606,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // Messages: revdelete-success, logdelete-success
                $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
                $this->getOutput()->wrapWikiMsg(
-                       "<span class=\"success\">\n$1\n</span>",
+                       "<div class=\"successbox\">\n$1\n</div>",
                        $this->typeLabels['success']
                );
                $this->wasSaved = true;
@@ -621,7 +621,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        protected function failure( $status ) {
                // Messages: revdelete-failure, logdelete-failure
                $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
-               $this->getOutput()->addWikiText( $status->getWikiText( $this->typeLabels['failure'] ) );
+               $this->getOutput()->addWikiText( '<div class="errorbox">' .
+                       $status->getWikiText( $this->typeLabels['failure'] ) .
+                       '</div>'
+               );
                $this->showForm();
        }
 
index 93eb6c5..9ad1afe 100644 (file)
        "revdelete-unsuppress": "Remove restrictions on restored revisions",
        "revdelete-log": "Reason:",
        "revdelete-submit": "Apply to selected {{PLURAL:$1|revision|revisions}}",
-       "revdelete-success": "<strong>Revision visibility successfully updated.</strong>",
-       "revdelete-failure": "<strong>Revision visibility could not be updated:</strong>\n$1",
-       "logdelete-success": "<strong>Log visibility successfully set.</strong>",
-       "logdelete-failure": "<strong>Log visibility could not be set:</strong>\n$1",
+       "revdelete-success": "Revision visibility successfully updated.",
+       "revdelete-failure": "Revision visibility could not be updated:\n$1",
+       "logdelete-success": "Log visibility successfully set.",
+       "logdelete-failure": "Log visibility could not be set:\n$1",
        "revdel-restore": "change visibility",
        "pagehist": "Page history",
        "deletedhist": "Deleted history",