From 3e4fdee72341534673a227744a20ef26c972a71d Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 16 Apr 2015 02:02:10 +0100 Subject: [PATCH] tags: Use successbox/errorbox instead of bolded text on SpecialEditTags Follows-up 5c46810. * Avoid style markup in i18n messages. Use successbox instead of 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: I596cbdc2cf9c9968350c9e63621c0e3fb5bd8c6c --- includes/specials/SpecialEditTags.php | 9 +++++---- languages/i18n/en.json | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialEditTags.php b/includes/specials/SpecialEditTags.php index 14850ffa40..bfd1717256 100644 --- a/includes/specials/SpecialEditTags.php +++ b/includes/specials/SpecialEditTags.php @@ -408,8 +408,6 @@ class SpecialEditTags extends UnlistedSpecialPage { $tagsToRemove = array_diff( $existingTags, $tagList ); } - //var_dump( array( 'add' => $tagsToAdd, 'remove' => $tagsToRemove ) ); - if ( !$tagsToAdd && !$tagsToRemove ) { $status = Status::newFatal( 'tags-edit-none-selected' ); } else { @@ -431,7 +429,7 @@ class SpecialEditTags extends UnlistedSpecialPage { */ protected function success() { $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) ); - $this->getOutput()->wrapWikiMsg( "\n$1\n", + $this->getOutput()->wrapWikiMsg( "
\n$1\n
", 'tags-edit-success' ); $this->wasSaved = true; $this->revList->reloadFromMaster(); @@ -445,7 +443,10 @@ class SpecialEditTags extends UnlistedSpecialPage { */ protected function failure( $status ) { $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) ); - $this->getOutput()->addWikiText( $status->getWikiText( 'tags-edit-failure' ) ); + $this->getOutput()->addWikiText( '
' . + $status->getWikiText( 'tags-edit-failure' ) . + '
' + ); $this->showForm(); } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 93eb6c56c8..c9a2f95932 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3454,8 +3454,8 @@ "tags-edit-reason": "Reason:", "tags-edit-revision-submit": "Apply changes to {{PLURAL:$1|this revision|$1 revisions}}", "tags-edit-logentry-submit": "Apply changes to {{PLURAL:$1|this log entry|$1 log entries}}", - "tags-edit-success": "The changes were successfully applied.", - "tags-edit-failure": "The changes could not be applied:\n$1", + "tags-edit-success": "The changes were successfully applied.", + "tags-edit-failure": "The changes could not be applied:\n$1", "tags-edit-nooldid-title": "Invalid target revision", "tags-edit-nooldid-text": "You have either not specified any target revision on which to perform this function, or the specified revision does not exist.", "tags-edit-none-selected": "Please select at least one tag to add or remove.", -- 2.20.1