From ae077178d165b298336355f2efa9d54cfee70e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Mon, 28 Nov 2011 13:02:47 -0800 Subject: [PATCH] Bug 615479 - Password manager prompts can now ask a more complete question [r=dolske] --- .../passwordmgr/nsLoginManagerPrompter.js | 16 ++++++++-------- .../passwordmgr/test/test_notifications.html | 6 +++--- .../chrome/passwordmgr/passwordmgr.properties | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js index f90199a3d294..196d1c8fa7a3 100644 --- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js +++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js @@ -815,11 +815,11 @@ LoginManagerPrompter.prototype = { if (aLogin.username) { var displayUser = this._sanitizeUsername(aLogin.username); notificationText = this._getLocalizedString( - "rememberPasswordText", + "rememberPasswordMsg", [displayUser, displayHost]); } else { notificationText = this._getLocalizedString( - "rememberPasswordTextNoUsername", + "rememberPasswordMsgNoUsername", [displayHost]); } @@ -947,11 +947,11 @@ LoginManagerPrompter.prototype = { if (aLogin.username) { var displayUser = this._sanitizeUsername(aLogin.username); dialogText = this._getLocalizedString( - "rememberPasswordText", + "rememberPasswordMsg", [displayUser, displayHost]); } else { dialogText = this._getLocalizedString( - "rememberPasswordTextNoUsername", + "rememberPasswordMsgNoUsername", [displayHost]); } @@ -1018,11 +1018,11 @@ LoginManagerPrompter.prototype = { var notificationText; if (aOldLogin.username) notificationText = this._getLocalizedString( - "updatePasswordText", + "updatePasswordMsg", [aOldLogin.username]); else notificationText = this._getLocalizedString( - "updatePasswordTextNoUser"); + "updatePasswordMsgNoUser"); var changeButtonText = this._getLocalizedString("notifyBarUpdateButtonText"); @@ -1100,11 +1100,11 @@ LoginManagerPrompter.prototype = { var dialogText; if (aOldLogin.username) dialogText = this._getLocalizedString( - "updatePasswordText", + "updatePasswordMsg", [aOldLogin.username]); else dialogText = this._getLocalizedString( - "updatePasswordTextNoUser"); + "updatePasswordMsgNoUser"); var dialogTitle = this._getLocalizedString( "passwordChangeTitle"); diff --git a/toolkit/components/passwordmgr/test/test_notifications.html b/toolkit/components/passwordmgr/test/test_notifications.html index f2a31d6781ce..f2a8646bb4f2 100644 --- a/toolkit/components/passwordmgr/test/test_notifications.html +++ b/toolkit/components/passwordmgr/test/test_notifications.html @@ -346,7 +346,7 @@ function checkTest() { ok(popup, "got notification popup"); // Check the text, which comes from the localized saveLoginText string. notificationText = popup.message; - expectedText = /^Remember password for \"notifyu1\" on example.org\?$/; + expectedText = /^Would you like to remember the password for \"notifyu1\" on example.org\?$/; ok(expectedText.test(notificationText), "Checking text: " + notificationText); popup.remove(); break; @@ -359,7 +359,7 @@ function checkTest() { ok(popup, "got notification popup"); // Check the text, which comes from the localized saveLoginText string. notificationText = popup.message; - expectedText = /^Remember password for \"nowisthetimeforallgoodmentocom[^e]\" on example.org\?$/; + expectedText = /^Would you like to remember the password for \"nowisthetimeforallgoodmentocom[^e]\" on example.org\?$/; ok(expectedText.test(notificationText), "Checking text: " + notificationText); popup.remove(); break; @@ -372,7 +372,7 @@ function checkTest() { ok(popup, "got notification popup"); // Check the text, which comes from the localized saveLoginTextNoUser string. notificationText = popup.message; - expectedText = /^Remember password on example.org\?$/; + expectedText = /^Would you like to remember the password on example.org\?$/; ok(expectedText.test(notificationText), "Checking text: " + notificationText); popup.remove(); break; diff --git a/toolkit/locales/en-US/chrome/passwordmgr/passwordmgr.properties b/toolkit/locales/en-US/chrome/passwordmgr/passwordmgr.properties index b04886a7163a..c4cb7dff1021 100644 --- a/toolkit/locales/en-US/chrome/passwordmgr/passwordmgr.properties +++ b/toolkit/locales/en-US/chrome/passwordmgr/passwordmgr.properties @@ -39,13 +39,13 @@ rememberValue = Use Password Manager to remember this value. rememberPassword = Use Password Manager to remember this password. savePasswordTitle = Confirm -# LOCALIZATION NOTE (rememberPasswordText): +# LOCALIZATION NOTE (rememberPasswordMsg): # 1st string is the username for the login, 2nd is the login's hostname. # Note that long usernames may be truncated. -rememberPasswordText = Remember password for "%1$S" on %2$S? -# LOCALIZATION NOTE (rememberPasswordTextNoUsername): +rememberPasswordMsg = Would you like to remember the password for "%1$S" on %2$S? +# LOCALIZATION NOTE (rememberPasswordMsgNoUsername): # String is the login's hostname. -rememberPasswordTextNoUsername = Remember password on %S? +rememberPasswordMsgNoUsername = Would you like to remember the password on %S? notNowButtonText = &Not Now notifyBarNotNowButtonText = Not Now notifyBarNotNowButtonAccessKey = N @@ -56,10 +56,10 @@ rememberButtonText = &Remember notifyBarRememberPasswordButtonText = Remember Password notifyBarRememberPasswordButtonAccessKey = R passwordChangeTitle = Confirm Password Change -# LOCALIZATION NOTE (updatePasswordText): +# LOCALIZATION NOTE (updatePasswordMsg): # String is the username for the login. -updatePasswordText = Update saved password for "%S"? -updatePasswordTextNoUser = Update saved password? +updatePasswordMsg = Would you like to update the saved password for "%S"? +updatePasswordMsgNoUser = Would you like to update the saved password? notifyBarUpdateButtonText = Update Password notifyBarUpdateButtonAccessKey = U notifyBarDontChangeButtonText = Don't Change