Repository: spyder-ide/spyder

Issue:
Consider changing the tooltip in the Files pane filter toggle to be less confusing and match the others
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

## Problem Description

As discussed in spyder-ide/spyder-docs#146 and originally implemented here in #13833 .

Currently, if the filename filter toggle is enabled (i.e. files are filtered), the tooltip reads `Deactivate filename filters`. Therefore, given the button with that tooltip is enabled, it is somewhat ambiguous whether the tooltip refers to the verb of pressing the button, (to deactivate filename filters), or the noun of what is being toggled (i.e. toggling it on _deactivates_ the filters). Its a small thing, but I was sufficiently confused that I initially thought it was a bug in the tooltip, and it doesn't match all our other tooltips for toggle buttons (e.g. in the toolbars of the Find in Files pane and the Find panel), which instead describe the noun of what is being toggled and don't change on click (e.g. Case-sensitive, Regex, Whole words, etc). This also matches what I generally see in a brief survey of other applications.

Therefore, what I propose is giving it consistent tooltip text regardless of toggle state that refers to the noun being toggled, i.e. `Filter filenames`. However, opinion on that was mixed, since both could potentially be interpreted either way. @isabela-pf , what do you think?

Also, not directly related, but the Spanish translation for one of the state tooltips is incorrect; it translates to "Edit filename filters" instead of referring to the function of the toggle button.


![image](https://user-images.githubusercontent.com/17051931/100485014-2b1d5d00-30c4-11eb-805e-14998748d2b4.png)

![image](https://user-images.githubusercontent.com/17051931/100485055-4f793980-30c4-11eb-8dc0-255cf9a71afb.png)



### What steps reproduce the problem?

1. Hover over disabled filter toggle in Files pane toolbar. Tooltip displays `Activate filename filters`
2. Click the toggle. The button is now toggled on and filenames are filtered. The tooltip now reads `Deactivate filename filters`


## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 4.2.0
* Python version: 3.7.9
* Qt version: 5.9.7
* PyQt version: 5.9.2
* Operating System name/version: Windows 8.1 x64



Discussion:
Note to self: we'll discuss this one with @isabela-pf in our Tuesday meeting.
We did indeed discuss this in a weekly meeting, and we all thought this was a good idea. I like the tooltip `Filter filenames` and see it matches with the majority of similar buttons already in Spyder (current interaction was matching a different set of buttons that are used less). Thanks for pointing it out!

Resolving patch:
diff --git a/spyder/plugins/explorer/widgets/explorer.py b/spyder/plugins/explorer/widgets/explorer.py
--- a/spyder/plugins/explorer/widgets/explorer.py
+++ b/spyder/plugins/explorer/widgets/explorer.py
@@ -1795,10 +1795,7 @@ def change_filter_state(self):
         """Handle the change of the filter state."""
         self.filter_on = not self.filter_on
         self.filter_button.setChecked(self.filter_on)
-        tip_message = (
-            _("Deactivate filename filters") if self.filter_on else _(
-                "Activate filename filters"))
-        self.filter_button.setToolTip(tip_message)
+        self.filter_button.setToolTip(_("Filter filenames"))
         self.filter_files()
 
     @Slot()


Test patch:
diff --git a/spyder/plugins/projects/tests/test_plugin.py b/spyder/plugins/projects/tests/test_plugin.py
--- a/spyder/plugins/projects/tests/test_plugin.py
+++ b/spyder/plugins/projects/tests/test_plugin.py
@@ -15,10 +15,7 @@
 import shutil
 import os.path as osp
 import sys
-try:
-    from unittest.mock import Mock
-except ImportError:
-    from mock import Mock  # Python 2
+from unittest.mock import Mock
 
 # Third party imports
 import pytest
@@ -344,6 +341,7 @@ def test_project_explorer_tree_root(projects, tmpdir, qtbot):
 
 
 @flaky(max_runs=5)
+@pytest.mark.skipif(sys.platform == 'darwin', reason="Fails on Mac")
 def test_filesystem_notifications(qtbot, projects, tmpdir):
     """
     Test that filesystem notifications are emitted when creating,