Bug 1414022 - fix wording of 'save message' and related dialogs. r=jorgk, ui-r=Paenglab
authorGene Smith <gds@chartertn.net>
Tue, 19 Dec 2017 18:54:53 -0500
changeset 30671 a24ffb32892cd8f6cf09f5a7cb6aa11312ac8cc2
parent 30670 1a7c1ae7a902c3aca80a5e36ce6c97a9a914802f
child 30672 dc0dd21764903490c50828534673b74c8e65b41a
push id382
push userclokep@gmail.com
push dateMon, 12 Mar 2018 19:05:34 +0000
reviewersjorgk, Paenglab
bugs1414022
Bug 1414022 - fix wording of 'save message' and related dialogs. r=jorgk, ui-r=Paenglab
mail/components/compose/content/MsgComposeCommands.js
mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties
mailnews/compose/src/nsMsgSend.cpp
suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties
suite/mailnews/compose/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -4237,21 +4237,23 @@ function ComposeCanClose()
     // call window.focus, since we need to pop up a dialog
     // and therefore need to be visible (to prevent user confusion)
     window.focus();
     let draftFolderURI = gCurrentIdentity.draftFolder;
     let draftFolderName = MailUtils.getFolderForURI(draftFolderURI).prettyName;
     let result = Services.prompt
                          .confirmEx(window,
                                     getComposeBundle().getString("saveDlogTitle"),
-                                    getComposeBundle().getFormattedString("saveDlogMessages2", [draftFolderName]),
+                                    getComposeBundle().getFormattedString("saveDlogMessages3", [draftFolderName]),
                                     (Services.prompt.BUTTON_TITLE_SAVE * Services.prompt.BUTTON_POS_0) +
                                     (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1) +
-                                    (Services.prompt.BUTTON_TITLE_DONT_SAVE * Services.prompt.BUTTON_POS_2),
-                                    null, null, null,
+                                    (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2),
+                                    null,
+                                    null,
+                                    getComposeBundle().getString("discardButtonLabel"),
                                     null, {value:0});
     switch (result)
     {
       case 0: //Save
         // Since we're going to save the message, we tell toolkit that
         // the close command failed, by returning false, and then
         // we close the window ourselves after the save is done.
         gCloseWindowAfterSave = true;
--- a/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties
+++ b/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties
@@ -108,20 +108,21 @@ smtpAuthMechNotSupported=The Outgoing se
 smtpAuthenticationNotSupported=Unable to authenticate to Outgoing server (SMTP) %S. It does not support authentication (SMTP-AUTH) but you have chosen to use authentication. Please change the 'Authentication method' to 'None' in the 'Account Settings | Outgoing Server (SMTP)' or contact your email service provider for instructions.
 
 # LOCALIZATION NOTE (errorIllegalLocalPart): %s is an email address with an illegal localpart
 errorIllegalLocalPart=There are non-ASCII characters in the local part of the recipient address %s. This is not yet supported. Please change this address and try again.
 
 ## Strings used for the save message dialog shown when the user closes a message compose window
 saveDlogTitle=Save Message
 
-## LOCALIZATION NOTE (saveDlogMessages2): Do not translate the words %1$S and \n.
+## LOCALIZATION NOTE (saveDlogMessages3): Do not translate the words %1$S and \n.
 ## %1$S is replaced by the folder name configured for saving drafts (typically the "Drafts" folder).
-## Translate "Write" to match the translation of item "windowTitlePrefix" below.
-saveDlogMessages2=Message has not been sent or saved in your drafts folder (%1$S).\n"Save" copies the message to your drafts folder (%1$S) and closes the Write window.\n"Don't Save" closes the Write window without saving a draft.\n"Cancel" allows you continue writing without saving a draft.
+## Translate "Write" to match the translation of item "windowTitleWrite" below.
+saveDlogMessages3=Save this message to your drafts folder (%1$S) and close the Write window?
+discardButtonLabel=&Discard changes
 
 ## generics string
 defaultSubject=(no subject)
 chooseFileToAttach=Attach File(s)
 genericFailureExplanation=Please verify that your account settings are correct and try again.
 
 ## LOCALIZATION NOTE (undisclosedRecipients): this string must use only US_ASCII characters
 undisclosedRecipients=undisclosed-recipients
@@ -339,37 +340,37 @@ smtpEnterPasswordPrompt=Enter your passw
 ## and %2$S where the user name should appear.
 smtpEnterPasswordPromptWithUsername=Enter your password for %2$S on %1$S:
 smtpEnterPasswordPromptTitle=Outgoing server (SMTP) Password Required
 
 # LOCALIZATION NOTE (removeAttachmentMsgs): Semi-colon list of plural forms.
 # See: http://developer.mozilla.org/en/Localization_and_Plurals
 removeAttachmentMsgs=Remove Attachment;Remove Attachments
 
-## LOCALIZATION NOTE(promptToSaveSentLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveSentLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved sent messages (typically the "Sent" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-## Translate "Write" to match the translation of item "windowTitlePrefix" above.
-promptToSaveSentLocally=Your message was sent but not saved to your sent folder (%1$S) probably because of network errors.\n"Retry" attempts the save again.\n"Save" copies the message to %3$S/%1$S-%2$S and closes the Write window if it is present.\n"Cancel" does not save the sent message and closes the Write window if it is present.
+## Translate "Write" to match the translation of item "windowTitleWrite" above.
+promptToSaveSentLocally2=Your message was sent but a copy was not placed in your sent folder (%1$S) due to network or file access errors.\nYou can retry or save the message locally to %3$S/%1$S-%2$S.
 errorFilteringMsg=Your message has been sent and saved, but there was an error while running message filters on it.
 errorCloudFileAuth.title=Authentication Error
 
-## LOCALIZATION NOTE(promptToSaveDraftLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveDraftLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved draft messages (typically the "Drafts" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-promptToSaveDraftLocally=Your draft message was not saved to your drafts folder (%1$S) probably because of network errors.\n"Retry" attempts to save again.\n"Save" copies the message to %3$S/%1$S-%2$S and you can continue writing.\n"Cancel" allows you to continue writing without saving your draft.
-buttonLabelRetry=Retry
+promptToSaveDraftLocally2=Your draft message was not copied to your drafts folder (%1$S) due to network or file access errors.\nYou can retry or save the draft locally to %3$S/%1$S-%2$S.
+buttonLabelRetry2=&Retry
 
-## LOCALIZATION NOTE(promptToSaveTemplateLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveTemplateLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved templates (typically the "Templates" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-promptToSaveTemplateLocally=Your template was not saved to your templates folder (%1$S) probably because of network errors.\n"Retry" attempts to save again.\n"Save" copies the message to %3$S/%1$S-%2$S and you can continue writing.\n"Cancel" allows you to continue writing without saving your template.
+promptToSaveTemplateLocally2=Your template was not copied to your templates folder (%1$S) due to network or file access errors.\nYou can retry or save the template locally to %3$S/%1$S-%2$S.
 
 ## LOCALIZATION NOTE(saveToLocalFoldersFailed): Message appears after normal
 ## save fails (e.g., to Sent) and save to Local Folders also fails. This could
 ## occur if network is down and filesystem problems are present such as disk
 ## full, permission issues or hardware failure.
 saveToLocalFoldersFailed=Unable to save your message to local folders. Possibly out of file storage space.
 
 ## LOCALIZATION NOTE(errorCloudFileAuth.message):
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -3885,42 +3885,42 @@ nsMsgComposeAndSend::NotifyListenerOnSto
     const char16_t *formatStrings[] = { mSavedToFolderName.get(), accountName.get(),
                                         localFoldersAccountName.get() };
 
     nsString msg;
     switch (m_deliver_mode)
     {
       case nsMsgDeliverNow:
       case nsMsgSendUnsent:
-        rv = bundle->FormatStringFromName("promptToSaveSentLocally",
+        rv = bundle->FormatStringFromName("promptToSaveSentLocally2",
                                           formatStrings, 3,
                                           msg);
         break;
       case nsMsgSaveAsDraft:
-        rv = bundle->FormatStringFromName("promptToSaveDraftLocally",
+        rv = bundle->FormatStringFromName("promptToSaveDraftLocally2",
                                           formatStrings, 3,
                                           msg);
         break;
       case nsMsgSaveAsTemplate:
-        rv = bundle->FormatStringFromName("promptToSaveTemplateLocally",
+        rv = bundle->FormatStringFromName("promptToSaveTemplateLocally2",
                                           formatStrings, 3,
                                           msg);
         break;
       default:
         rv = NS_ERROR_UNEXPECTED;
     }
     NS_ENSURE_SUCCESS(rv, rv);
     int32_t buttonPressed = 0;
     bool showCheckBox = false;
     uint32_t buttonFlags = (nsIPrompt::BUTTON_POS_0 * nsIPrompt::BUTTON_TITLE_IS_STRING) +
-                           (nsIPrompt::BUTTON_POS_1 * nsIPrompt::BUTTON_TITLE_CANCEL) +
+                           (nsIPrompt::BUTTON_POS_1 * nsIPrompt::BUTTON_TITLE_DONT_SAVE) +
                            (nsIPrompt::BUTTON_POS_2 * nsIPrompt::BUTTON_TITLE_SAVE);
     nsString dialogTitle, buttonLabelRetry;
     bundle->GetStringFromName("SaveDialogTitle", dialogTitle);
-    bundle->GetStringFromName("buttonLabelRetry", buttonLabelRetry);
+    bundle->GetStringFromName("buttonLabelRetry2", buttonLabelRetry);
     prompt->ConfirmEx(dialogTitle.get(), msg.get(), buttonFlags, buttonLabelRetry.get(),
                       nullptr, nullptr, nullptr, &showCheckBox, &buttonPressed);
     if (buttonPressed == 0)
     {
       // retry button clicked
       mSendProgress = nullptr; // this was canceled, so we need to clear it.
       return SendToMagicFolder(m_deliver_mode);
     }
--- a/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties
+++ b/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties
@@ -108,20 +108,21 @@ smtpAuthMechNotSupported=The Outgoing se
 smtpAuthenticationNotSupported=Unable to authenticate to Outgoing server (SMTP) %S. It does not support authentication (SMTP-AUTH) but you have chosen to use authentication. Please change the 'Authentication method' to 'None' in 'Account Settings | Outgoing server (SMTP)' or contact your email service provider for instructions.
 
 # LOCALIZATION NOTE (errorIllegalLocalPart): %s is an email address with an illegal localpart
 errorIllegalLocalPart=There are non-ASCII characters in the local part of the recipient address %s. This is not yet supported. Please change this address and try again.
 
 ## Strings used for the save message dialog shown when the user closes a message compose window
 saveDlogTitle=Save Message
 
-## LOCALIZATION NOTE (saveDlogMessages2): Do not translate the words %1$S and \n.
+## LOCALIZATION NOTE (saveDlogMessages3): Do not translate the words %1$S and \n.
 ## %1$S is replaced by the folder name configured for saving drafts (typically the "Drafts" folder).
 ## Translate "Compose" to match the translation of item "windowTitlePrefix" below.
-saveDlogMessages2=Message has not been sent or saved in your drafts folder (%1$S).\n"Save" copies the message to your drafts folder (%1$S) and closes the Compose window.\n"Don't Save" closes the Compose window without saving a draft.\n"Cancel" allows you continue writing without saving a draft.
+saveDlogMessages3=Save this message to your drafts folder (%1$S) and close the Compose window?
+discardButtonLabel=&Discard changes
 
 ## generics string
 defaultSubject=(no subject)
 chooseFileToAttach=Attach File(s)
 
 ##
 windowTitlePrefix=Compose:
 
@@ -236,36 +237,35 @@ renameAttachmentMessage=New attachment n
 smtpEnterPasswordPrompt=Enter your password for %S:
 
 ## LOCALIZATION NOTE(smtpEnterPasswordPromptWithUsername): Do not translate the
 ## words %1$S and %2$S. Place the word %1$S where the host name should appear,
 ## and %2$S where the user name should appear.
 smtpEnterPasswordPromptWithUsername=Enter your password for %2$S on %1$S:
 smtpEnterPasswordPromptTitle=Outgoing server (SMTP) Server Password Required
 
-## LOCALIZATION NOTE(promptToSaveSentLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveSentLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved sent messages (typically the "Sent" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-## Translate "Compose" to match the translation of item "windowTitlePrefix" above.
-promptToSaveSentLocally=Your message was sent but not saved to your sent folder (%1$S) probably because of network errors.\n"Retry" attempts the save again.\n"Save" copies the message to %3$S/%1$S-%2$S and closes the Compose window if it is present.\n"Cancel" does not save the sent message and closes the Compose window if it is present.
+promptToSaveSentLocally2=Your message was sent but a copy was not placed in your sent folder (%1$S) due to network or file access errors.\nYou can retry or save the message locally to %3$S/%1$S-%2$S.
 errorFilteringMsg=Your message has been sent and saved, but there was an error while running message filters on it.
 
-## LOCALIZATION NOTE(promptToSaveDraftLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveDraftLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved draft messages (typically the "Drafts" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-promptToSaveDraftLocally=Your draft message was not saved to your drafts folder (%1$S) probably because of network errors.\n"Retry" attempts to save again.\n"Save" copies the message to %3$S/%1$S-%2$S and you can continue writing.\n"Cancel" allows you to continue writing without saving your draft.
-buttonLabelRetry=Retry
+promptToSaveDraftLocally2=Your draft message was not copied to your drafts folder (%1$S) due to network or file access errors.\nYou can retry or save the draft locally to %3$S/%1$S-%2$S.
+buttonLabelRetry2=&Retry
 
-## LOCALIZATION NOTE(promptToSaveTemplateLocally): Do not translate the stings %1$S, %2$S, %3$S and \n.
+## LOCALIZATION NOTE(promptToSaveTemplateLocally2): Do not translate the stings %1$S, %2$S, %3$S and \n.
 ## %2$S will be replaced with the account name. $1$S will be replaced by the folder name
 ## configured to contain saved templates (typically the "Templates" folder).
 ## %3$S will be replaced with the local folders account name (typically "Local Folders").
-promptToSaveTemplateLocally=Your template was not saved to your templates folder (%1$S) probably because of network errors.\n"Retry" attempts to save again.\n"Save" copies the message to %3$S/%1$S-%2$S and you can continue writing.\n"Cancel" allows you to continue writing without saving your template.
+promptToSaveTemplateLocally2=Your template was not copied to your templates folder (%1$S) due to network or file access errors.\nYou can retry or save the template locally to %3$S/%1$S-%2$S.
 
 ## LOCALIZATION NOTE(saveToLocalFoldersFailed): Message appears after normal
 ## save fails (e.g., to Sent) and save to Local Folders also fails. This could
 ## occur if network is down and filesystem problems are present such as disk
 ## full, permission issues or hardware failure.
 saveToLocalFoldersFailed=Unable to save your message to local folders. Possibly out of file storage space.
 
 ## LOCALIZATION NOTE(blockedAllowResource): %S is the URL to load.
--- a/suite/mailnews/compose/MsgComposeCommands.js
+++ b/suite/mailnews/compose/MsgComposeCommands.js
@@ -2316,21 +2316,24 @@ function ComposeCanClose()
   {
     // call window.focus, since we need to pop up a dialog
     // and therefore need to be visible (to prevent user confusion)
     window.focus();
     let draftFolderURI = gCurrentIdentity.draftFolder;
     let draftFolderName = MailUtils.getFolderForURI(draftFolderURI).prettyName;
     switch (Services.prompt.confirmEx(window,
               sComposeMsgsBundle.getString("saveDlogTitle"),
-              sComposeMsgsBundle.getFormattedString("saveDlogMessages2", [draftFolderName]),
+              sComposeMsgsBundle.getFormattedString("saveDlogMessages3", [draftFolderName]),
               (Services.prompt.BUTTON_TITLE_SAVE * Services.prompt.BUTTON_POS_0) +
               (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1) +
-              (Services.prompt.BUTTON_TITLE_DONT_SAVE * Services.prompt.BUTTON_POS_2),
-              null, null, null, null, {value:0}))
+              (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2),
+              null,
+              null,
+              getComposeBundle().getString("discardButtonLabel"),
+              null, {value:0}))
     {
       case 0: //Save
         // we can close immediately if we already autosaved the draft
         if (!gContentChanged && !gMsgCompose.bodyModified)
           break;
         gCloseWindowAfterSave = true;
         GenericSendMessage(nsIMsgCompDeliverMode.AutoSaveAsDraft);
         return false;