Bug 1269958 - Change the information details of the summary section in Downloads Panel. r?paolo
MozReview-Commit-ID: 1hKBRXOBH6c
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -84,17 +84,17 @@ const kDownloadsStringsRequiringFormatti
shortTimeLeftHours: true,
shortTimeLeftDays: true,
statusSeparator: true,
statusSeparatorBeforeNumber: true,
fileExecutableSecurityWarning: true
};
const kDownloadsStringsRequiringPluralForm = {
- otherDownloads2: true
+ otherDownloads3: true
};
const kPartialDownloadSuffix = ".part";
const kPrefBranch = Services.prefs.getBranch("browser.download.");
var PrefObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
@@ -1515,22 +1515,21 @@ DownloadsSummaryData.prototype = {
* Computes aggregate values based on the current state of downloads.
*/
_refreshProperties() {
// Pre-load summary with default values.
let summary =
DownloadsCommon.summarizeDownloads(this._downloadsForSummary());
this._description = DownloadsCommon.strings
- .otherDownloads2(summary.numActive);
+ .otherDownloads3(summary.numDownloading);
this._percentComplete = summary.percentComplete;
- // If all downloads are paused, show the progress indicator as paused.
- this._showingProgress = summary.numDownloading > 0 ||
- summary.numPaused > 0;
+ // Only show the downloading items.
+ this._showingProgress = summary.numDownloading > 0;
// Display the estimated time left, if present.
if (summary.rawTimeLeft == -1) {
// There are no downloads with a known time left.
this._lastRawTimeLeft = -1;
this._lastTimeLeft = -1;
this._details = "";
} else {
--- a/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
+++ b/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
@@ -25,21 +25,21 @@
-->
<!ENTITY downloadDetails.width "50ch">
<!-- LOCALIZATION NOTE (downloadsSummary.minWidth2):
Minimum width for the main description of the downloads summary,
which is displayed at the bottom of the Downloads Panel if the
number of downloads exceeds the limit that the panel can display.
- A good rule of thumb here is to look at the otherDownloads2 string
+ A good rule of thumb here is to look at the otherDownloads3 string
in downloads.properties, and make a reasonable estimate of its
maximum length. For English, this seems like a reasonable limit:
- + 999 other downloads
+ 999 files downloading
that's 21 characters, so we set the minimum width to 21ch.
-->
<!ENTITY downloadsSummary.minWidth2 "21ch">
<!ENTITY cmd.pause.label "Pause">
<!ENTITY cmd.pause.accesskey "P">
<!ENTITY cmd.resume.label "Resume">
--- a/browser/locales/en-US/chrome/browser/downloads/downloads.properties
+++ b/browser/locales/en-US/chrome/browser/downloads/downloads.properties
@@ -95,14 +95,14 @@ shortTimeLeftDays=%1$Sd
# even for right-to-left languages, unless the defaults are not suitable.
statusSeparator=%1$S \u2014 %2$S
statusSeparatorBeforeNumber=%1$S \u2014 %2$S
fileExecutableSecurityWarning=“%S” is an executable file. Executable files may contain viruses or other malicious code that could harm your computer. Use caution when opening this file. Are you sure you want to launch “%S”?
fileExecutableSecurityWarningTitle=Open Executable File?
fileExecutableSecurityWarningDontAsk=Don’t ask me this again
-# LOCALIZATION NOTE (otherDownloads2):
+# LOCALIZATION NOTE (otherDownloads3):
# This is displayed in an item at the bottom of the Downloads Panel when
# there are more downloads than can fit in the list in the panel. Use a
# semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/Localization_and_Plurals
-otherDownloads2=+ %1$S other download; + %1$S other downloads
+otherDownloads3=%1$S file downloading;%1$S files downloading