зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1697484 - Update copy for Add/Update Password panel. r=sfoster,flod
Differential Revision: https://phabricator.services.mozilla.com/D107877
This commit is contained in:
Родитель
0466b1cf9e
Коммит
c4febaf661
|
@ -211,7 +211,7 @@ class LoginManagerPrompter {
|
|||
);
|
||||
|
||||
let saveMsgNames = {
|
||||
prompt: login.username === "" ? "saveLoginMsgNoUser" : "saveLoginMsg",
|
||||
prompt: login.username === "" ? "saveLoginMsgNoUser2" : "saveLoginMsg2",
|
||||
buttonLabel: "saveLoginButtonAllow.label",
|
||||
buttonAccessKey: "saveLoginButtonAllow.accesskey",
|
||||
secondaryButtonLabel: "saveLoginButtonDeny.label",
|
||||
|
@ -219,7 +219,8 @@ class LoginManagerPrompter {
|
|||
};
|
||||
|
||||
let changeMsgNames = {
|
||||
prompt: login.username === "" ? "updateLoginMsgNoUser" : "updateLoginMsg",
|
||||
prompt:
|
||||
login.username === "" ? "updateLoginMsgNoUser2" : "updateLoginMsg2",
|
||||
buttonLabel: "updateLoginButtonText",
|
||||
buttonAccessKey: "updateLoginButtonAccessKey",
|
||||
secondaryButtonLabel: "updateLoginButtonDeny.label",
|
||||
|
@ -233,12 +234,10 @@ class LoginManagerPrompter {
|
|||
changeMsgNames.prompt = messageStringID;
|
||||
}
|
||||
|
||||
let brandBundle = Services.strings.createBundle(BRAND_BUNDLE);
|
||||
let brandShortName = brandBundle.GetStringFromName("brandShortName");
|
||||
let host = this._getShortDisplayHost(login.origin);
|
||||
let promptMsg =
|
||||
type == "password-save"
|
||||
? this._getLocalizedString(saveMsgNames.prompt, [brandShortName, host])
|
||||
? this._getLocalizedString(saveMsgNames.prompt, [host])
|
||||
: this._getLocalizedString(changeMsgNames.prompt);
|
||||
|
||||
let histogramName =
|
||||
|
@ -720,7 +719,7 @@ class LoginManagerPrompter {
|
|||
// one that is already saved and we don't want to reveal
|
||||
// it as the submitter of this form may not be the account
|
||||
// owner, they may just be using the saved password.
|
||||
(messageStringID == "updateLoginMsgAddUsername" &&
|
||||
(messageStringID == "updateLoginMsgAddUsername2" &&
|
||||
login.timePasswordChanged <
|
||||
Date.now() - VISIBILITY_TOGGLE_MAX_PW_AGE_MS);
|
||||
toggleBtn.hidden = hideToggle;
|
||||
|
@ -849,7 +848,7 @@ class LoginManagerPrompter {
|
|||
// If the saved password matches the password we're prompting with then we
|
||||
// are only prompting to let the user add a username since there was one in
|
||||
// the form. Change the message so the purpose of the prompt is clearer.
|
||||
messageStringID = "updateLoginMsgAddUsername";
|
||||
messageStringID = "updateLoginMsgAddUsername2";
|
||||
}
|
||||
|
||||
LoginManagerPrompter._showLoginCaptureDoorhanger(
|
||||
|
|
|
@ -330,11 +330,7 @@ add_task(async function test_pwOnlyNewLoginMatchesUPForm() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "checking for notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(
|
||||
notif.message,
|
||||
"Would you like to add a username to the saved password?",
|
||||
"Check message"
|
||||
);
|
||||
is(notif.message, "Add username to saved password?", "Check message");
|
||||
|
||||
let { panel } = PopupNotifications;
|
||||
let passwordVisiblityToggle = panel.querySelector(
|
||||
|
@ -385,11 +381,7 @@ add_task(async function test_pwOnlyOldLoginMatchesUPForm() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "checking for notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(
|
||||
notif.message,
|
||||
"Would you like to add a username to the saved password?",
|
||||
"Check message"
|
||||
);
|
||||
is(notif.message, "Add username to saved password?", "Check message");
|
||||
|
||||
let { panel } = PopupNotifications;
|
||||
let passwordVisiblityToggle = panel.querySelector(
|
||||
|
@ -477,7 +469,7 @@ add_task(async function test_changeUPLoginOnUPForm_dont() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "got notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(notif.message, "Would you like to update this login?", "Check message");
|
||||
is(notif.message, "Update this login?", "Check message");
|
||||
|
||||
await checkDoorhangerUsernamePassword("notifyu1", "pass2");
|
||||
clickDoorhangerButton(notif, DONT_CHANGE_BUTTON);
|
||||
|
@ -505,7 +497,7 @@ add_task(async function test_changeUPLoginOnUPForm_remove() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "got notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(notif.message, "Would you like to update this login?", "Check message");
|
||||
is(notif.message, "Update this login?", "Check message");
|
||||
|
||||
await checkDoorhangerUsernamePassword("notifyu1", "pass2");
|
||||
clickDoorhangerButton(notif, REMOVE_LOGIN_MENUITEM);
|
||||
|
@ -537,7 +529,7 @@ add_task(async function test_changeUPLoginOnUPForm_change() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "got notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(notif.message, "Would you like to update this login?", "Check message");
|
||||
is(notif.message, "Update this login?", "Check message");
|
||||
|
||||
await checkDoorhangerUsernamePassword("notifyu1", "pass2");
|
||||
let promiseLoginUpdateSaved = TestUtils.topicObserved(
|
||||
|
@ -577,7 +569,7 @@ add_task(async function test_changePLoginOnUPForm() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "got notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(notif.message, "Would you like to update this password?", "Check msg");
|
||||
is(notif.message, "Update this password?", "Check msg");
|
||||
|
||||
await checkDoorhangerUsernamePassword("", "pass2");
|
||||
clickDoorhangerButton(notif, CHANGE_BUTTON);
|
||||
|
@ -606,7 +598,7 @@ add_task(async function test_changePLoginOnPForm() {
|
|||
let notif = await getCaptureDoorhangerThatMayOpen("password-change");
|
||||
ok(notif, "got notification popup");
|
||||
ok(!notif.dismissed, "doorhanger is not dismissed");
|
||||
is(notif.message, "Would you like to update this password?", "Check msg");
|
||||
is(notif.message, "Update this password?", "Check msg");
|
||||
|
||||
await checkDoorhangerUsernamePassword("", "notifyp1");
|
||||
clickDoorhangerButton(notif, CHANGE_BUTTON);
|
||||
|
@ -637,11 +629,8 @@ add_task(async function test_checkUPSaveText() {
|
|||
ok(notif, "got notification popup");
|
||||
// Check the text, which comes from the localized saveLoginMsg string.
|
||||
let notificationText = notif.message;
|
||||
let expectedText =
|
||||
"Would you like " +
|
||||
BRAND_SHORT_NAME +
|
||||
" to save this login for example.com?";
|
||||
is(expectedText, notificationText, "Checking text: " + notificationText);
|
||||
let expectedText = "Save login for example.com?";
|
||||
is(notificationText, expectedText, "Checking text: " + notificationText);
|
||||
await cleanupDoorhanger(notif);
|
||||
});
|
||||
|
||||
|
@ -665,11 +654,8 @@ add_task(async function test_checkPSaveText() {
|
|||
ok(notif, "got notification popup");
|
||||
// Check the text, which comes from the localized saveLoginMsgNoUser string.
|
||||
let notificationText = notif.message;
|
||||
let expectedText =
|
||||
"Would you like " +
|
||||
BRAND_SHORT_NAME +
|
||||
" to save this password for example.com?";
|
||||
is(expectedText, notificationText, "Checking text: " + notificationText);
|
||||
let expectedText = "Save password for example.com?";
|
||||
is(notificationText, expectedText, "Checking text: " + notificationText);
|
||||
await cleanupDoorhanger(notif);
|
||||
});
|
||||
|
||||
|
|
|
@ -4,24 +4,24 @@
|
|||
|
||||
rememberPassword = Use Password Manager to remember this password.
|
||||
savePasswordTitle = Confirm
|
||||
# LOCALIZATION NOTE (saveLoginMsg, saveLoginMsgNoUser):
|
||||
# %1$S is brandShortName, %2$S is the login's hostname.
|
||||
saveLoginMsg = Would you like %1$S to save this login for %2$S?
|
||||
saveLoginMsgNoUser = Would you like %1$S to save this password for %2$S?
|
||||
# LOCALIZATION NOTE (saveLoginMsg2, saveLoginMsgNoUser2):
|
||||
# %S is the login's hostname.
|
||||
saveLoginMsg2 = Save login for %S?
|
||||
saveLoginMsgNoUser2 = Save password for %S?
|
||||
saveLoginButtonAllow.label = Save
|
||||
saveLoginButtonAllow.accesskey = S
|
||||
saveLoginButtonDeny.label = Don’t Save
|
||||
saveLoginButtonDeny.label = Don’t save
|
||||
saveLoginButtonDeny.accesskey = D
|
||||
saveLoginButtonNever.label = Never Save
|
||||
saveLoginButtonNever.label = Never save
|
||||
saveLoginButtonNever.accesskey = e
|
||||
updateLoginMsg = Would you like to update this login?
|
||||
updateLoginMsgNoUser = Would you like to update this password?
|
||||
updateLoginMsgAddUsername = Would you like to add a username to the saved password?
|
||||
updateLoginMsg2 = Update this login?
|
||||
updateLoginMsgNoUser2 = Update this password?
|
||||
updateLoginMsgAddUsername2 = Add username to saved password?
|
||||
updateLoginButtonText = Update
|
||||
updateLoginButtonAccessKey = U
|
||||
updateLoginButtonDeny.label = Don’t Update
|
||||
updateLoginButtonDeny.label = Don’t update
|
||||
updateLoginButtonDeny.accesskey = D
|
||||
updateLoginButtonDelete.label = Remove Saved Login
|
||||
updateLoginButtonDelete.label = Remove saved login
|
||||
updateLoginButtonDelete.accesskey = R
|
||||
# LOCALIZATION NOTE (rememberPasswordMsg):
|
||||
# 1st string is the username for the login, 2nd is the login's hostname.
|
||||
|
|
Загрузка…
Ссылка в новой задаче