Bug 480169: Update strings for Clear Recent History dialog, and add some additional strings in preparation for later refactoring, r=gavin, ui-r=beltzner, a=mconnor
authorDrew Willcoxon <adw@mozilla.com>
Fri, 20 Mar 2009 01:30:29 -0400
changeset 26409 542e7bcb3e0f48c7c688355d65767d07a9413a82
parent 26408 4be589e93b228d7f7948a4f255adf9d9b28bb20c
child 26410 451c1f1753f00907e116a26c6d3cad71f3dbfcb4
push idunknown
push userunknown
push dateunknown
reviewersgavin, beltzner, mconnor
bugs480169
milestone1.9.2a1pre
Bug 480169: Update strings for Clear Recent History dialog, and add some additional strings in preparation for later refactoring, r=gavin, ui-r=beltzner, a=mconnor
browser/base/content/sanitize.xul
browser/components/preferences/sanitize.xul
browser/locales/en-US/chrome/browser/browser.properties
browser/locales/en-US/chrome/browser/sanitize.dtd
--- a/browser/base/content/sanitize.xul
+++ b/browser/base/content/sanitize.xul
@@ -49,17 +49,17 @@
   %brandDTD;
   %sanitizeDTD;
 ]>
 
 <prefwindow id="SanitizeDialog" type="child"
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
             dlgbuttons="accept,cancel"
             title="&sanitizeDialog2.title;"
-            style="width: &window.width;;"
+            style="width: &dialog.width;;"
             ondialogaccept="gSanitizePromptDialog.sanitize();">
 
   <prefpane id="SanitizeDialogPane" onpaneload="gSanitizePromptDialog.init();">
     <stringbundle id="bundleBrowser" src="chrome://browser/locale/browser.properties"/>
     
     <script type="application/x-javascript" src="chrome://browser/content/sanitize.js"/>
     <script type="application/x-javascript">
     <![CDATA[
@@ -73,17 +73,17 @@
           for (var i = 0; i < sanitizePreferences.childNodes.length; ++i) {
             var preference = sanitizePreferences.childNodes[i];
             var name = s.getNameFromPreference(preference.name);
             if (!s.canClearItem(name)) 
               preference.disabled = true;
           }
           
           var bundleBrowser = document.getElementById("bundleBrowser");
-          document.documentElement.getButton("accept").label = bundleBrowser.getString("sanitizeButton2");
+          document.documentElement.getButton("accept").label = bundleBrowser.getString("sanitizeButtonOK");
         },
       
         checkPrefs : function ()
         {
           var prefService = Components.classes["@mozilla.org/preferences-service;1"]
                             .getService(Components.interfaces.nsIPrefService);
           var cpdBranch = prefService.getBranch("privacy.cpd.");
           
@@ -194,74 +194,74 @@
       <preference id="privacy.sanitize.timeSpan"
                   name="privacy.sanitize.timeSpan"
                   type="int"/>
     </preferences>
 
     <groupbox orient="vertical">
       <caption label="&historySection.label;"/>
       <hbox id="SanitizeDurationBox" align="center">
-        <label value="&clearDuration.label;" control="sanitizeDurationChoice"
-               accesskey="&clearDuration.accesskey;" id="sanitizeDurationLabel"/>
+        <label value="&clearTimeDuration.label;" control="sanitizeDurationChoice"
+               accesskey="&clearTimeDuration.accesskey;" id="sanitizeDurationLabel"/>
         <menulist id="sanitizeDurationChoice"
                   preference="privacy.sanitize.timeSpan">
           <menupopup>
-            <menuitem label="&clearDuration.lastHour;" value="1"/>
-            <menuitem label="&clearDuration.last2Hours;" value="2"/>
-            <menuitem label="&clearDuration.last4Hours;" value="3"/>
-            <menuitem label="&clearDuration.today;" value="4"/>
+            <menuitem label="&clearTimeDuration.lastHour;" value="1"/>
+            <menuitem label="&clearTimeDuration.last2Hours;" value="2"/>
+            <menuitem label="&clearTimeDuration.last4Hours;" value="3"/>
+            <menuitem label="&clearTimeDuration.today;" value="4"/>
             <menuseparator/>
-            <menuitem label="&clearDuration.everything;" value="0"/>
+            <menuitem label="&clearTimeDuration.everything;" value="0"/>
           </menupopup>
         </menulist>
-        <label value="&clearDuration.suffix;" flex="1"/>
+        <label value="&clearTimeDuration.suffix;" flex="1"/>
       </hbox>
       <hbox>
         <vbox style="width: &column.width;">
           <checkbox id="history-checkbox"
-                    label="&itemVisitedPages.label;"
-                    accesskey="&itemVisitedPages.accesskey;"
+                    label="&itemBrowsingHistory.label;"
+                    accesskey="&itemBrowsingHistory.accesskey;"
                     preference="privacy.cpd.history"
                     oncommand="gSanitizePromptDialog.updateDownloadHistory();"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
           <checkbox id="downloads-checkbox"
-                    label="&itemDownloadList.label;"
-                    accesskey="&itemDownloadList.accesskey;"
+                    label="&itemDownloadHistory.label;"
+                    accesskey="&itemDownloadHistory.accesskey;"
                     preference="privacy.cpd.downloads"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadDownloads();"/>
-          <checkbox label="&itemFormSearchEntries.label;"
-                    accesskey="&itemFormSearchEntries.accesskey;"
+          <checkbox label="&itemFormSearchHistory.label;"
+                    accesskey="&itemFormSearchHistory.accesskey;"
                     preference="privacy.cpd.formdata"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
         </vbox>
         <vbox style="width: &column.width;">
           <checkbox label="&itemCookies.label;"
                     accesskey="&itemCookies.accesskey;"
                     preference="privacy.cpd.cookies"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
           <checkbox label="&itemActiveLogins.label;"
                     accesskey="&itemActiveLogins.accesskey;"
                     preference="privacy.cpd.sessions"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
-          <checkbox label="&itemWebCache.label;"
-                    accesskey="&itemWebCache.accesskey;"
+          <checkbox label="&itemCache.label;"
+                    accesskey="&itemCache.accesskey;"
                     preference="privacy.cpd.cache"
                     onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
         </vbox>
       </hbox>
     </groupbox>
     <groupbox orient="horizontal">
       <caption label="&dataSection.label;"/>
       <vbox style="width: &column.width;">
         <checkbox label="&itemPasswords.label;"
                   accesskey="&itemPasswords.accesskey;"
                   preference="privacy.cpd.passwords"
                   onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
-        <checkbox label="&itemSiteSettings.label;"
-                  accesskey="&itemSiteSettings.accesskey;"
+        <checkbox label="&itemSitePreferences.label;"
+                  accesskey="&itemSitePreferences.accesskey;"
                   preference="privacy.cpd.siteSettings"
                   onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
       </vbox>
       <vbox style="width: &column.width;">
         <checkbox label="&itemOfflineApps.label;"
                   accesskey="&itemOfflineApps.accesskey;"
                   preference="privacy.cpd.offlineApps"
                   onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
--- a/browser/components/preferences/sanitize.xul
+++ b/browser/components/preferences/sanitize.xul
@@ -47,17 +47,17 @@
   %brandDTD;
   %sanitizeDTD;
 ]>
 
 <prefwindow id="SanitizeDialog" type="child"
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
             dlgbuttons="accept,cancel,help"
             ondialoghelp="openPrefsHelp()"
-            title="&sanitizePrefs.title;">
+            title="&sanitizePrefs2.title;">
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
 
   <prefpane id="SanitizeDialogPane"
             helpTopic="prefs-clear-private-data">
 
     <preferences>
       <preference id="privacy.item.history"               name="privacy.item.history"               type="bool"/>
@@ -71,46 +71,46 @@
       <preference id="privacy.item.siteSettings"          name="privacy.item.siteSettings"          type="bool"/>
     </preferences>
 
     <description>&clearDataSettings2.label;</description>
 
     <groupbox orient="horizontal">
       <caption label="&historySection.label;"/>
       <vbox style="width: &column.width;">
-        <checkbox label="&itemVisitedPages.label;"
-                  accesskey="&itemVisitedPages.accesskey;"
+        <checkbox label="&itemBrowsingHistory.label;"
+                  accesskey="&itemBrowsingHistory.accesskey;"
                   preference="privacy.item.history"/>
-        <checkbox label="&itemDownloadList.label;"
-                  accesskey="&itemDownloadList.accesskey;"
+        <checkbox label="&itemDownloadHistory.label;"
+                  accesskey="&itemDownloadHistory.accesskey;"
                   preference="privacy.item.downloads"/>
-        <checkbox label="&itemFormSearchEntries.label;"
-                  accesskey="&itemFormSearchEntries.accesskey;"
+        <checkbox label="&itemFormSearchHistory.label;"
+                  accesskey="&itemFormSearchHistory.accesskey;"
                   preference="privacy.item.formdata"/>
       </vbox>
       <vbox style="width: &column.width;">
         <checkbox label="&itemCookies.label;"
                   accesskey="&itemCookies.accesskey;"
                   preference="privacy.item.cookies"/>
         <checkbox label="&itemActiveLogins.label;"
                   accesskey="&itemActiveLogins.accesskey;"
                   preference="privacy.item.sessions"/>
-        <checkbox label="&itemWebCache.label;"
-                  accesskey="&itemWebCache.accesskey;"
+        <checkbox label="&itemCache.label;"
+                  accesskey="&itemCache.accesskey;"
                   preference="privacy.item.cache"/>
       </vbox>
     </groupbox>
     <groupbox orient="horizontal">
       <caption label="&dataSection.label;"/>
       <vbox style="width: &column.width;">
         <checkbox label="&itemPasswords.label;"
                   accesskey="&itemPasswords.accesskey;"
                   preference="privacy.item.passwords"/>
-        <checkbox label="&itemSiteSettings.label;"
-                  accesskey="&itemSiteSettings.accesskey;"
+        <checkbox label="&itemSitePreferences.label;"
+                  accesskey="&itemSitePreferences.accesskey;"
                   preference="privacy.item.siteSettings"/>
       </vbox>
       <vbox style="width: &column.width;">
         <checkbox label="&itemOfflineApps.label;"
                   accesskey="&itemOfflineApps.accesskey;"
                   preference="privacy.item.offlineApps"/>
       </vbox>
     </groupbox>
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -56,17 +56,32 @@ missingpluginsMessage.button.accesskey=I
 blockedpluginsMessage.title=Some plugins required by this page have been blocked for your protection.
 blockedpluginsMessage.infoButton.label=Details…
 blockedpluginsMessage.infoButton.accesskey=D
 blockedpluginsMessage.searchButton.label=Update Plugins…
 blockedpluginsMessage.searchButton.accesskey=U
 
 # Sanitize
 sanitizeWithPromptLabel2=Clear Recent History…
-sanitizeButton2=Clear Private Data
+# LOCALIZATION NOTE (sanitizeDialog2.everything.title): When "Time range to
+# clear" is set to "Everything", the Clear Recent History dialog's title is
+# changed to this.  See UI mockup and comment 11 at bug 480169 -->
+sanitizeDialog2.everything.title=Clear All History
+sanitizeButtonOK=Clear Now
+# LOCALIZATION NOTE (sanitizeEverythingWarning): Warning that appears when "Time
+# range to clear" is set to "Everything" in Clear Recent History dialog.  UI
+# mockup at bug 480169.  This value is a semi-colon list of plural forms.  #1 is
+# replaced with the number of history visits. %S is replaced with the date of
+# the oldest visit.
+# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
+sanitizeEverythingWarning=All history will be cleared.  Your history includes one page visit since %S.;All history will be cleared.  Your history includes #1 page visits since %S.
+# LOCALIZATION NOTE (sanitizeEverythingNoVisitsWarning): Used in same context
+# as sanitizeEverythingWarning except this is shown instead when there are no
+# visits in the user's history.
+sanitizeEverythingNoVisitsWarning=All history will be cleared.
 
 # Check for Updates
 updatesItem_default=Check for Updates…
 updatesItem_defaultFallback=Check for Updates…
 updatesItem_downloading=Downloading %S…
 updatesItem_downloadingFallback=Downloading Update…
 updatesItem_resume=Resume Downloading %S…
 updatesItem_resumeFallback=Resume Downloading Update…
--- a/browser/locales/en-US/chrome/browser/sanitize.dtd
+++ b/browser/locales/en-US/chrome/browser/sanitize.dtd
@@ -1,43 +1,62 @@
-<!ENTITY sanitizePrefs.title           "Clear Private Data">
+<!ENTITY sanitizePrefs2.title          "Settings for Clearing History">
 <!ENTITY sanitizeDialog2.title         "Clear Recent History">
 
 <!ENTITY sanitizeItems.label          "Clear the following items now:">
 <!ENTITY clearDataSettings2.label     "When I quit &brandShortName;, it should automatically clear all:">
 
 <!-- XXX rearrange entities to match physical layout when l10n isn't an issue -->
+<!-- LOCALIZATION NOTE (clearTimeDuration.*): "Time range to clear" dropdown.
+     See UI mockup at bug 480169 -->
+<!ENTITY clearTimeDuration.label          "Time range to clear: ">
+<!ENTITY clearTimeDuration.accesskey      "T">
+<!ENTITY clearTimeDuration.lastHour       "Last Hour">
+<!ENTITY clearTimeDuration.last2Hours     "Last Two Hours">
+<!ENTITY clearTimeDuration.last4Hours     "Last Four Hours">
+<!ENTITY clearTimeDuration.today          "Today">
+<!ENTITY clearTimeDuration.everything     "Everything">
+<!-- Localization note (clearTimeDuration.suffix) - trailing entity for languages
+that require it.  -->
+<!ENTITY clearTimeDuration.suffix         "">
+<!ENTITY clearTimeDuration.dateColumn     "Visit Date">
+<!ENTITY clearTimeDuration.nameColumn     "Name">
 
-<!ENTITY clearDuration.label          "Remove ">
-<!ENTITY clearDuration.accesskey      "R">
-<!ENTITY clearDuration.lastHour       "the last hour">
-<!ENTITY clearDuration.last2Hours     "the last 2 hours">
-<!ENTITY clearDuration.last4Hours     "the last 4 hours">
-<!ENTITY clearDuration.today          "my history for today">
-<!ENTITY clearDuration.everything     "my entire history">
-<!-- Localization note (clearDuration.suffix) - trailing entity for languages
-that require it.  -->
-<!ENTITY clearDuration.suffix         "">
+<!-- LOCALIZATION NOTE (detailsProgressiveDisclosure.*): Labels and accesskeys
+     of the "Details" progressive disclosure button.  See UI mockup at bug
+     480169 -->
+<!ENTITY detailsProgressiveDisclosure.label     "Details">
+<!ENTITY detailsProgressiveDisclosure.accesskey "e">
 
 <!ENTITY historySection.label         "History">
 <!ENTITY dataSection.label            "Data">
 
-<!ENTITY itemVisitedPages.label       "Visited Pages">
-<!ENTITY itemVisitedPages.accesskey   "V">
-<!ENTITY itemFormSearchEntries.label  "Form &amp; Search Entries">
-<!ENTITY itemFormSearchEntries.accesskey "F">
-<!ENTITY itemPasswords.label          "Saved Passwords">
-<!ENTITY itemPasswords.accesskey      "P">
-<!ENTITY itemCookies.label            "Cookies">
-<!ENTITY itemCookies.accesskey        "C">
-<!ENTITY itemWebCache.label           "Web Cache">
-<!ENTITY itemWebCache.accesskey       "W">
-<!ENTITY itemOfflineApps.label        "Offline Website Data">
-<!ENTITY itemOfflineApps.accesskey    "O">
-<!ENTITY itemDownloadList.label       "Download List">
-<!ENTITY itemDownloadList.accesskey   "D">
-<!ENTITY itemActiveLogins.label       "Active Logins">
-<!ENTITY itemActiveLogins.accesskey   "L">
-<!ENTITY itemSiteSettings.label       "Site-specific Settings">
-<!ENTITY itemSiteSettings.accesskey   "S">
+<!-- LOCALIZATION NOTE (item*): itemHistoryAndDownloads.* and
+     itemBrowsingHistory.* will never be used at the same time, so they can
+     have the same accesskey. -->
+<!ENTITY itemHistoryAndDownloads.label     "Browsing and Download History">
+<!ENTITY itemHistoryAndDownloads.accesskey "B">
+<!ENTITY itemBrowsingHistory.label         "Browsing History">
+<!ENTITY itemBrowsingHistory.accesskey     "B">
+<!ENTITY itemFormSearchHistory.label       "Form &amp; Search History">
+<!ENTITY itemFormSearchHistory.accesskey   "F">
+<!ENTITY itemPasswords.label               "Saved Passwords">
+<!ENTITY itemPasswords.accesskey           "P">
+<!ENTITY itemCookies.label                 "Cookies">
+<!ENTITY itemCookies.accesskey             "C">
+<!ENTITY itemCache.label                   "Cache">
+<!ENTITY itemCache.accesskey               "A">
+<!ENTITY itemOfflineApps.label             "Offline Website Data">
+<!ENTITY itemOfflineApps.accesskey         "O">
+<!ENTITY itemDownloadHistory.label         "Download History">
+<!ENTITY itemDownloadHistory.accesskey     "D">
+<!ENTITY itemActiveLogins.label            "Active Logins">
+<!ENTITY itemActiveLogins.accesskey        "L">
+<!ENTITY itemSitePreferences.label         "Site Preferences">
+<!ENTITY itemSitePreferences.accesskey     "S">
 
-<!ENTITY window.width                 "30em">
+<!-- LOCALIZATION NOTE (sanitizeEverythingUndoWarning): Second warning paragraph
+     that appears when "Time range to clear" is set to "Everything".  See UI
+     mockup at bug 480169 -->
+<!ENTITY sanitizeEverythingUndoWarning     "This action cannot be undone.">
+
+<!ENTITY dialog.width                 "32em">
 <!ENTITY column.width                 "14em">