RCFilters: Add conflicts for minor edits
authorMoriel Schottlender <moriel@gmail.com>
Mon, 20 Mar 2017 23:26:15 +0000 (16:26 -0700)
committerCatrope <roan@wikimedia.org>
Wed, 22 Mar 2017 02:02:23 +0000 (02:02 +0000)
Bug: T160803
Change-Id: I91d736d772e36f54144330c30092fac85dc70d20

includes/specialpage/ChangesListSpecialPage.php
languages/i18n/en.json
languages/i18n/qqq.json

index 8f702ba..8e9629d 100644 (file)
@@ -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'
+               );
        }
 
        /**
index f512000..f502a0a 100644 (file)
        "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 <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
        "rclistfrom": "Show new changes starting from $2, $3",
        "rcshowhideminor": "$1 minor edits",
index 3116163..3cad314 100644 (file)
        "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.",