From 8d6cdbc40c0a4c31b6ab48b48a6fb7897c5924c7 Mon Sep 17 00:00:00 2001 From: "caillon%returnzero.com" Date: Mon, 5 May 2003 22:19:23 +0000 Subject: [PATCH] Bug 77104 - Remove Account prompt should say which account r=biesi sr=sspitzer a=sspitzer --- .../base/prefs/resources/content/AccountManager.js | 13 +++++++++++-- .../prefs/resources/locale/en-US/prefs.properties | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mailnews/base/prefs/resources/content/AccountManager.js b/mailnews/base/prefs/resources/content/AccountManager.js index f117149732a..508ea18bd25 100644 --- a/mailnews/base/prefs/resources/content/AccountManager.js +++ b/mailnews/base/prefs/resources/content/AccountManager.js @@ -482,6 +482,7 @@ function onRemoveAccount(event) { var server = account.incomingServer; var type = server.type; + var prettyName = server.prettyName; var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + type].getService(Components.interfaces.nsIMsgProtocolInfo); var canDelete = protocolinfo.canDelete; @@ -492,9 +493,17 @@ function onRemoveAccount(event) { return; var confirmRemoveAccount = - gPrefsBundle.getString("confirmRemoveAccount"); - if (!window.confirm(confirmRemoveAccount)) + gPrefsBundle.getFormattedString("confirmRemoveAccount", [prettyName]); + + var confirmTitle = gPrefsBundle.getString("confirmRemoveAccountTitle"); + + var promptService = + Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. + getService(Components.interfaces.nsIPromptService); + if (!promptService || + !promptService.confirm(window, confirmTitle, confirmRemoveAccount)) { return; + } try { // clear cached data out of the account array diff --git a/mailnews/base/prefs/resources/locale/en-US/prefs.properties b/mailnews/base/prefs/resources/locale/en-US/prefs.properties index 1dd5c28803d..757fe1651f1 100644 --- a/mailnews/base/prefs/resources/locale/en-US/prefs.properties +++ b/mailnews/base/prefs/resources/locale/en-US/prefs.properties @@ -43,7 +43,9 @@ enterValidEmailPrefix=Please enter a valid email address. enterValidHostname=Please enter a valid hostname. failedRemoveAccount=Failed to remove this account. failedDuplicateAccount=Failed to duplicate this account. -confirmRemoveAccount=Are you sure you want to remove this account? +#LOCALIZATION NOTE: confirmRemoveAccount: %S is the account pretty name +confirmRemoveAccount=Are you sure you want to remove the account "%S"? +confirmRemoveAccountTitle=Remove Account #LOCALIZATION NOTE: accountName: %1$S is server name, %2$S is user name accountName=%1$S - %2$S