зеркало из https://github.com/mozilla/pjs.git
Bug #308367 --> Resume downloading thunderbird stays in the menu after update is downloaded.
the update strings in the help menu aren't getting updated properly. Port some firefox changes over to make this work. sr=bienvenu
This commit is contained in:
Родитель
9f1a00c470
Коммит
729a24304e
|
@ -2554,27 +2554,35 @@ function buildHelpMenu()
|
|||
if (!gMessengerBundle)
|
||||
gMessengerBundle = document.getElementById("bundle_messenger");
|
||||
|
||||
var label = gMessengerBundle.getString("updates_checkForUpdates");
|
||||
var activeUpdate = um.activeUpdate;
|
||||
if (activeUpdate)
|
||||
{
|
||||
if (updates.isDownloading)
|
||||
{
|
||||
if (activeUpdate.name)
|
||||
label = gMessengerBundle.getFormattedString("updates_downloadingUpdates", [activeUpdate.name]);
|
||||
else
|
||||
label = gMessengerBundle.getString("updates_downloadingUpdatesFallback");
|
||||
|
||||
// If there's an active update, substitute its name into the label
|
||||
// we show for this item, otherwise display a generic label.
|
||||
function getStringWithUpdateName(key) {
|
||||
if (activeUpdate && activeUpdate.name)
|
||||
return gMessengerBundle.getFormattedString(key, [activeUpdate.name]);
|
||||
return gMessengerBundle.getString(key + "Fallback");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (activeUpdate.name)
|
||||
label = gMessengerBundle.getFormattedString("updates_resumeDownloading", [activeUpdate.name]);
|
||||
else
|
||||
label = gMessengerBundle.getString("updates_resumeDownloadingFallback");
|
||||
|
||||
// By default, show "Check for Updates..."
|
||||
var key = "default";
|
||||
if (activeUpdate) {
|
||||
switch (activeUpdate.state) {
|
||||
case "downloading":
|
||||
// If we're downloading an update at present, show the text:
|
||||
// "Downloading Firefox x.x..." otherwise we're paused, and show
|
||||
// "Resume Downloading Firefox x.x..."
|
||||
key = updates.isDownloading ? "downloading" : "resume";
|
||||
break;
|
||||
case "pending":
|
||||
// If we're waiting for the user to restart, show: "Apply Downloaded
|
||||
// Updates Now..."
|
||||
key = "pending";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
checkForUpdates.label = label;
|
||||
checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
|
||||
if (um.activeUpdate && updates.isDownloading)
|
||||
checkForUpdates.setAttribute("loading", "true");
|
||||
else
|
||||
|
|
|
@ -374,9 +374,11 @@ confirmPhishingUrl1=%1$S thinks this site is suspicious! It may be trying to imp
|
|||
confirmPhishingUrl2=%1$S thinks this site is suspicious! It may be trying to impersonate the web page you want to visit. Are you sure you want to visit %2$S?
|
||||
|
||||
# Check for Updates
|
||||
updates_checkForUpdates=Check for Updates...
|
||||
updates_downloadingUpdates=Downloading %S...
|
||||
updates_downloadingUpdatesFallback=Downloading Update...
|
||||
updates_resumeDownloading=Resume Downloading %S...
|
||||
updates_resumeDownloadingFallback=Resume Downloading Update...
|
||||
|
||||
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...
|
||||
updatesItem_pending=Apply Downloaded Update Now...
|
||||
updatesItem_pendingFallback=Apply Downloaded Update Now...
|
||||
|
|
Загрузка…
Ссылка в новой задаче