From c29477f4c52b3801d542d0b9a867d3309576b8aa Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Mon, 20 Mar 2017 16:26:15 -0700 Subject: [PATCH] RCFilters: Add conflicts for minor edits Bug: T160803 Change-Id: I91d736d772e36f54144330c30092fac85dc70d20 --- .../specialpage/ChangesListSpecialPage.php | 27 +++++++++++++++++++ languages/i18n/en.json | 3 +++ languages/i18n/qqq.json | 3 +++ 3 files changed, 33 insertions(+) diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 8f702bab2d..8e9629dca4 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -531,6 +531,33 @@ abstract class ChangesListSpecialPage extends SpecialPage { 'rcfilters-filtergroup-user-experience-level-conflicts-unregistered', 'rcfilters-filter-unregistered-conflicts-user-experience-level' ); + + $changeTypeGroup = $this->getFilterGroup( 'changeType' ); + $categoryFilter = $changeTypeGroup->getFilter( 'hidecategorization' ); + $logactionsFilter = $changeTypeGroup->getFilter( 'hidelog' ); + $pagecreationFilter = $changeTypeGroup->getFilter( 'hidenewpages' ); + + $significanceTypeGroup = $this->getFilterGroup( 'significance' ); + $hideMinorFilter = $significanceTypeGroup->getFilter( 'hideminor' ); + + $hideMinorFilter->conflictsWith( + $categoryFilter, + 'rcfilters-hideminor-conflicts-typeofchange-global', + 'rcfilters-hideminor-conflicts-typeofchange', + 'rcfilters-typeofchange-conflicts-hideminor' + ); + $hideMinorFilter->conflictsWith( + $logactionsFilter, + 'rcfilters-hideminor-conflicts-typeofchange-global', + 'rcfilters-hideminor-conflicts-typeofchange', + 'rcfilters-typeofchange-conflicts-hideminor' + ); + $hideMinorFilter->conflictsWith( + $pagecreationFilter, + 'rcfilters-hideminor-conflicts-typeofchange-global', + 'rcfilters-hideminor-conflicts-typeofchange', + 'rcfilters-typeofchange-conflicts-hideminor' + ); } /** diff --git a/languages/i18n/en.json b/languages/i18n/en.json index f512000dd0..f502a0aac6 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1424,6 +1424,9 @@ "rcfilters-filter-categorization-description": "Records of pages being added or removed from categories.", "rcfilters-filter-logactions-label": "Logged actions", "rcfilters-filter-logactions-description": "Administrative actions, account creations, page deletions, uploads....", + "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor edits\" filter conflicts with one or more Type of Change filters, because certain types of change cannot be designated as \"minor.\" The conflicting filters are marked in the Active Filters area, above.", + "rcfilters-hideminor-conflicts-typeofchange": "Certain types of change cannot be designated as \"minor,\" so this filter conflicts with the following Type of Change filters: $1", + "rcfilters-typeofchange-conflicts-hideminor": "This Type of Change filter conflicts with the \"Minor Edits\" filter. Certain types of change cannot be designated as \"minor.\"", "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since $3, $4 (up to $1 shown).", "rclistfrom": "Show new changes starting from $2, $3", "rcshowhideminor": "$1 minor edits", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 3116163234..3cad314c8e 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1603,6 +1603,9 @@ "rcfilters-filter-major-label": "Label for the filter for showing edits not marked as minor.", "rcfilters-filter-major-description": " Description for the filter for showing edits not marked as minor.", "rcfilters-filtergroup-changetype": "Title for the filter group for edit type.", + "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor edits\" filter is conflicting with one or more Type of Change filters, because certain types of change cannot be designated as \"minor.\" The conflicting filters are marked in the Active Filters area, above.", + "rcfilters-hideminor-conflicts-typeofchange": "Tooltip shown when hovering over the Minor edits tag, when a Type of Change filter is also selected.\n\n\"Minor edits\" is {{msg-mw|rcfilters-filter-minor-label}}.\n\n\"Type of change\" is {{msg-mw|rcfilters-filtergroup-changetype}}.\n\nThis indicates that no results will be shown. Parameters:\n* $1 - Comma-separated string of selected Type of Change filters, e.g. \"Category, Logged Actions\"\n* $2 - Count of selected User Experience Level filters, for PLURAL", + "rcfilters-typeofchange-conflicts-hideminor": "Tooltip shown when hovering over a Type of change filter tag, when the Minor edits filter is also selected.\n\n\"Minor edits\" is {{msg-mw|rcfilters-filter-minor-label}}.\n\n\"Type of change\" is {{msg-mw|rcfilters-filtergroup-changetype}}.\n\nThis indicates that no results will be shown.", "rcfilters-filter-pageedits-label": "Label for the filter for showing edits to existing pages.", "rcfilters-filter-pageedits-description": "Description for the filter for showing edits to existing pages.", "rcfilters-filter-newpages-label": "Label for the filter for showing edits that create a page.", -- 2.20.1