Bug 1272466 - Adding in container name to the tab title tooltip r=flod,Gijs
authorJonathan Kingston <jkt@mozilla.com>
Thu, 24 Nov 2016 17:54:47 +0000
changeset 324671 b25f222b8636e91b9fb79a4c25a658bd981871a1
parent 324670 19d1b588f308767bbd3c8cc720f29b5e6ef70a3f
child 324672 3a64450cc56a11645148cf396768e0bc56c90953
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersflod, Gijs
bugs1272466
milestone53.0a1
Bug 1272466 - Adding in container name to the tab title tooltip r=flod,Gijs MozReview-Commit-ID: JpBEYF7UWaT
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
@@ -4607,17 +4607,21 @@
                   "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" : "");
+            if (tab.userContextId) {
+              label = this.mStringBundle.getFormattedString("tabs.containers.tooltip", [label, ContextualIdentityService.getUserContextLabel(tab.userContextId)]);
+            }
           }
+
           event.target.setAttribute("label", label);
         ]]></body>
       </method>
 
       <method name="handleEvent">
         <parameter name="aEvent"/>
         <body><![CDATA[
           switch (aEvent.type) {
--- a/browser/locales/en-US/chrome/browser/tabbrowser.properties
+++ b/browser/locales/en-US/chrome/browser/tabbrowser.properties
@@ -44,8 +44,14 @@ tabs.unmuteAudio.tooltip=Unmute tab (%S)
 tabs.muteAudio.background.tooltip=Mute tab
 tabs.unmuteAudio.background.tooltip=Unmute tab
 
 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
+
+# LOCALIZATION NOTE (tabs.containers.tooltip):
+# Displayed as a tooltip on container tabs
+# %1$S is the title of the current tab
+# %2$S is the name of the current container
+tabs.containers.tooltip=%1$S - %2$S