Bug 593126 - Reword text in the private browsing mode content area page based on the menu structure; r=dao a=blocking-beta6+
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 10 Sep 2010 15:55:32 -0400
changeset 53739 4e868145aa6bac0f9e7d0a09cbdae870671d7dd3
parent 53738 7b2fbb60e12ab524893ff12e1e2d9087ff6b89af
child 53740 e75a780dfd06786b59cc1ce0c9f722d68f5f0a4f
push id15685
push usereakhgari@mozilla.com
push dateMon, 13 Sep 2010 22:01:54 +0000
treeherdermozilla-central@ccaffbc6a970 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, blocking-beta6
bugs593126
milestone2.0b6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 593126 - Reword text in the private browsing mode content area page based on the menu structure; r=dao a=blocking-beta6+
browser/base/content/browser.xul
browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml
browser/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd
browser/locales/en-US/chrome/browser/browser.dtd
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -436,17 +436,21 @@
   </popupset>
 
 #ifdef MENUBAR_CAN_AUTOHIDE
   <vbox id="titlebar">
   <hbox id="titlebar-content">
   <hbox id="appmenu-button-container" align="start">
   <button id="appmenu-button"
           type="menu"
+#ifdef XP_WIN
           label="&brandShortName;"
+#else
+          label="&appMenuButton.label;"
+#endif
           style="-moz-user-focus: ignore;">
     <menupopup id="appmenu-popup"
                onpopupshowing="updateEditUIVisibility();">
       <hbox>
         <vbox id="appmenuPrimaryPane">
           <hbox flex="1"
                 class="split-menuitem">
             <menuitem id="appmenu_newTab"
--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml
+++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml
@@ -40,29 +40,42 @@
   <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
   %htmlDTD;
   <!ENTITY % netErrorDTD SYSTEM "chrome://global/locale/netError.dtd">
   %netErrorDTD;
   <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
   %globalDTD;
   <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
   %browserDTD;
+#ifdef XP_WIN
+  <!ENTITY basePBMenu.label   "<span class='appMenuButton'>&brandShortName;</span><span class='toolsMenu'>&toolsMenu.label;</span>">
+#elifdef XP_MACOSX
+  <!ENTITY basePBMenu.label   "&toolsMenu.label;">
+#else
+  <!ENTITY basePBMenu.label   "<span class='appMenuButton'>&appMenuButton.label;</span><span class='toolsMenu'>&toolsMenu.label;</span>">
+#endif
   <!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
   %privatebrowsingpageDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
     <link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
     <style type="text/css"><![CDATA[
       body.normal .showPrivate,
       body.private .showNormal {
         display: none;
       }
+      body.appMenuButtonVisible .toolsMenu {
+        display: none;
+      }
+      body.appMenuButtonInvisible .appMenuButton {
+        display: none;
+      }
     ]]></style>
     <script type="application/javascript;version=1.7"><![CDATA[
       const Cc = Components.classes;
       const Ci = Components.interfaces;
 
       var pb = Cc["@mozilla.org/privatebrowsing;1"].
                getService(Ci.nsIPrivateBrowsingService);
 
@@ -108,16 +121,23 @@
 
         // Set up the help link
         let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
                           getService(Ci.nsIURLFormatter).
                           formatURLPref("app.support.baseURL");
         let moreInfoLink = document.getElementById("moreInfoLink");
         if (moreInfoLink)
           moreInfoLink.setAttribute("href", moreInfoURL + "private-browsing");
+
+        // Show the correct menu structure based on whether the App Menu button is
+        // shown or not.
+        var menuBar = mainWindow.document.getElementById("toolbar-menubar");
+        var appMenuButtonIsVisible = menuBar.getAttribute("autohide") == "true";
+        document.body.classList.add(appMenuButtonIsVisible ? "appMenuButtonVisible" :
+                                                             "appMenuButtonInvisible");
       }, false);
       
       function togglePrivateBrowsing() {
         mainWindow.gPrivateBrowsingUI.toggleMode();
       }
     ]]></script>
   </head>
 
@@ -152,18 +172,18 @@
           <button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
                   id="startPrivateBrowsing" label="&privatebrowsingpage.startPrivateBrowsing.label;"
                   accesskey="&privatebrowsingpage.startPrivateBrowsing.accesskey;"
                   oncommand="togglePrivateBrowsing();"/>
         </div>
 
         <!-- Footer -->
         <div id="footerDesc">
-          <p id="footerText" class="showPrivate">&privatebrowsingpage.howToStop;</p>
-          <p id="footerTextNormal" class="showNormal">&privatebrowsingpage.howToStart;</p>
+          <p id="footerText" class="showPrivate">&privatebrowsingpage.howToStop2;</p>
+          <p id="footerTextNormal" class="showNormal">&privatebrowsingpage.howToStart2;</p>
         </div>
 
         <!-- More Info -->
         <div id="moreInfo" class="showPrivate">
           <p id="moreInfoText">
             &privatebrowsingpage.moreInfo;
           </p>
           <p id="moreInfoLinkContainer">
--- a/browser/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd
+++ b/browser/locales/en-US/chrome/browser/aboutPrivateBrowsing.dtd
@@ -10,13 +10,15 @@
 <!-- LOCALIZATION NOTE (privatebrowsingpage.clearRecentHistoryAfter): include a starting space as needed -->
 <!ENTITY privatebrowsingpage.clearRecentHistoryBefore  "You may want to start by also ">
 <!ENTITY privatebrowsingpage.clearRecentHistoryInner   "clearing your recent history">
 <!ENTITY privatebrowsingpage.clearRecentHistoryAfter   ".">
 
 <!ENTITY privatebrowsingpage.startPrivateBrowsing.label "Start Private Browsing">
 <!ENTITY privatebrowsingpage.startPrivateBrowsing.accesskey "P">
 
-<!ENTITY privatebrowsingpage.howToStop                 "To stop Private Browsing, select &toolsMenu.label; &gt; &privateBrowsingCmd.stop.label;, or close &brandShortName;.">
-<!ENTITY privatebrowsingpage.howToStart                "To start Private Browsing, you can also select &toolsMenu.label; &gt; &privateBrowsingCmd.start.label;.">
+<!-- LOCALIZATION NOTE (privatebrowsingpage.howToStop2): please leave &basePBMenu.label; intact in the translation -->
+<!-- LOCALIZATION NOTE (privatebrowsingpage.howToStart2): please leave &basePBMenu.label; intact in the translation -->
+<!ENTITY privatebrowsingpage.howToStop2                "To stop Private Browsing, select &basePBMenu.label; &gt; &privateBrowsingCmd.stop.label;, or close &brandShortName;.">
+<!ENTITY privatebrowsingpage.howToStart2               "To start Private Browsing, you can also select &basePBMenu.label; &gt; &privateBrowsingCmd.start.label;.">
 
 <!ENTITY privatebrowsingpage.moreInfo                  "While this computer won't have a record of your browsing history, your internet service provider or employer can still track the pages you visit.">
 <!ENTITY privatebrowsingpage.learnMore                 "Learn More">
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -128,16 +128,17 @@ can reach it easily. -->
 
 <!ENTITY backForwardItem.title        "Back/Forward">
 <!ENTITY locationItem.title           "Location">
 <!ENTITY searchItem.title             "Search">
 <!ENTITY throbberItem.title           "Activity Indicator">
 <!ENTITY bookmarksItem.title          "Bookmarks">
 
 <!-- Toolbar items --> 
+<!ENTITY appMenuButton.label          "Menu">
 <!ENTITY  homeButton.label            "Home">
 <!ENTITY tabViewButton2.label         "Tab Groups">
 <!ENTITY tabViewButton2.tooltip       "Group Your Tabs">
 
 <!ENTITY bookmarksButton.label          "Bookmarks">
 <!ENTITY bookmarksButton.tooltip        "Display your bookmarks">
 <!ENTITY bookmarksButton.accesskey  "B">
 <!ENTITY bookmarksCmd.commandkey "b">