Bug 1308153 - part3 : add tooltip for unblock icon. draft
authorAlastor Wu <alwu@mozilla.com>
Thu, 27 Oct 2016 15:53:53 +0800
changeset 430150 bba3a5a3937c4d61cdd40f77cd8c1cc5692d6515
parent 430149 a06c5bf879015dfe54098d0ac5db128afa3c26bb
child 535136 0ae30001a3488bf7f5cd8dce3a87b0031f82b8cd
push id33751
push useralwu@mozilla.com
push dateThu, 27 Oct 2016 07:54:24 +0000
bugs1308153
milestone52.0a1
Bug 1308153 - part3 : add tooltip for unblock icon. MozReview-Commit-ID: CTSQsLIQc9P
browser/base/content/tabbrowser.xml
browser/locales/en-US/chrome/browser/tabbrowser.properties
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4471,19 +4471,24 @@
           } else if (tab._overPlayingIcon) {
             let stringID;
             if (tab.selected) {
               stringID = tab.linkedBrowser.audioMuted ?
                 "tabs.unmuteAudio.tooltip" :
                 "tabs.muteAudio.tooltip";
               label = stringWithShortcut(stringID, "key_toggleMute");
             } else {
-              stringID = tab.linkedBrowser.audioMuted ?
-                "tabs.unmuteAudio.background.tooltip" :
-                "tabs.muteAudio.background.tooltip";
+              if (tab.linkedBrowser.audioBlocked) {
+                stringID = "tabs.unblockAudio.tooltip";
+              } else {
+                stringID = tab.linkedBrowser.audioMuted ?
+                  "tabs.unmuteAudio.background.tooltip" :
+                  "tabs.muteAudio.background.tooltip";
+              }
+
               label = this.mStringBundle.getString(stringID);
             }
           } else {
             label = tab.getAttribute("label") +
                       (this.AppConstants.E10S_TESTING_ONLY && tab.linkedBrowser && tab.linkedBrowser.isRemoteBrowser ? " - e10s" : "");
           }
           event.target.setAttribute("label", label);
         ]]></body>
--- a/browser/locales/en-US/chrome/browser/tabbrowser.properties
+++ b/browser/locales/en-US/chrome/browser/tabbrowser.properties
@@ -38,11 +38,14 @@ tabs.closeSelectedTab.tooltip=Close tab 
 # %S is the keyboard shortcut for "Mute tab"
 tabs.muteAudio.tooltip=Mute tab (%S)
 # LOCALIZATION NOTE (tabs.unmuteAudio.tooltip):
 # %S is the keyboard shortcut for "Unmute tab"
 tabs.unmuteAudio.tooltip=Unmute tab (%S)
 tabs.muteAudio.background.tooltip=Mute tab
 tabs.unmuteAudio.background.tooltip=Unmute tab
 
+# LOCALIZATION NOTE (tabs.unblockedAudio.tooltip):
+tabs.unblockAudio.tooltip=Play tab
+
 # LOCALIZATION NOTE (tabs.allowTabFocusByPromptForSite):
 # %S is the hostname of the site where dialogs are allowed to switch tabs
 tabs.allowTabFocusByPromptForSite=Allow dialogs from %S to take you to their tab