зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277895 - Remove one new line from http auth prompt message. r=dolske
This commit is contained in:
Родитель
56c54a3930
Коммит
28e47547d6
|
@ -826,7 +826,7 @@ mount_operation_ask_password (GMountOperation *mount_op,
|
|||
if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
|
||||
if (!realm.IsEmpty()) {
|
||||
const char16_t *strings[] = { realm.get(), dispHost.get() };
|
||||
bundle->FormatStringFromName(u"EnterLoginForRealm2",
|
||||
bundle->FormatStringFromName(u"EnterLoginForRealm3",
|
||||
strings, 2, getter_Copies(nsmessage));
|
||||
} else {
|
||||
const char16_t *strings[] = { dispHost.get() };
|
||||
|
|
|
@ -695,15 +695,15 @@ var PromptUtils = {
|
|||
|
||||
let text;
|
||||
if (isProxy) {
|
||||
text = this.bundle.formatStringFromName("EnterLoginForProxy2", [realm, displayHost], 2);
|
||||
text = this.bundle.formatStringFromName("EnterLoginForProxy3", [realm, displayHost], 2);
|
||||
} else if (isPassOnly) {
|
||||
text = this.bundle.formatStringFromName("EnterPasswordFor", [username, displayHost], 2);
|
||||
} else if (isCrossOrig) {
|
||||
text = this.bundle.formatStringFromName("EnterUserPasswordForCrossOrigin", [displayHost], 1);
|
||||
text = this.bundle.formatStringFromName("EnterUserPasswordForCrossOrigin2", [displayHost], 1);
|
||||
} else if (!realm) {
|
||||
text = this.bundle.formatStringFromName("EnterUserPasswordFor2", [displayHost], 1);
|
||||
} else {
|
||||
text = this.bundle.formatStringFromName("EnterLoginForRealm2", [realm, displayHost], 2);
|
||||
text = this.bundle.formatStringFromName("EnterLoginForRealm3", [realm, displayHost], 2);
|
||||
}
|
||||
|
||||
return text;
|
||||
|
|
|
@ -81,7 +81,7 @@ runInParent(() => {
|
|||
|
||||
add_task(function* test_iframe() {
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest”",
|
||||
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest”",
|
||||
title : "Authentication Required",
|
||||
textValue : "mochiuser1",
|
||||
passValue : "mochipass1",
|
||||
|
@ -110,7 +110,7 @@ add_task(function* test_iframe() {
|
|||
iframe.contentDocument);
|
||||
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest2”",
|
||||
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest2”",
|
||||
title : "Authentication Required",
|
||||
textValue : "mochiuser2",
|
||||
passValue : "mochipass2",
|
||||
|
@ -151,7 +151,7 @@ add_task(function* test_iframe() {
|
|||
// expected password (to trigger an auth prompt, and change-password
|
||||
// popup notification).
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest”",
|
||||
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest”",
|
||||
title : "Authentication Required",
|
||||
textValue : "mochiuser1",
|
||||
passValue : "mochipass1",
|
||||
|
@ -183,7 +183,7 @@ add_task(function* test_iframe() {
|
|||
// to (but have an existing saved login for, so that we'll trigger
|
||||
// a change-password popup notification.
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest3”",
|
||||
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest3”",
|
||||
title : "Authentication Required",
|
||||
textValue : "mochiuser3",
|
||||
passValue : "mochipass3-old",
|
||||
|
@ -229,7 +229,7 @@ add_task(function* test_iframe() {
|
|||
});
|
||||
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest3”",
|
||||
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest3”",
|
||||
title : "Authentication Required",
|
||||
textValue : "",
|
||||
passValue : "",
|
||||
|
|
|
@ -125,7 +125,7 @@ let prompter2 = new PrompterProxy(prompterParent);
|
|||
|
||||
add_task(function* test_accept() {
|
||||
state = {
|
||||
msg : "http://example.com is requesting your username and password.\n\nThe site says: “some realm”",
|
||||
msg : "http://example.com is requesting your username and password. The site says: “some realm”",
|
||||
title : "Authentication Required",
|
||||
textValue : "inuser",
|
||||
passValue : "inpass",
|
||||
|
@ -162,7 +162,7 @@ add_task(function* test_accept() {
|
|||
|
||||
add_task(function* test_cancel() {
|
||||
state = {
|
||||
msg : "http://example.com is requesting your username and password.\n\nThe site says: “some realm”",
|
||||
msg : "http://example.com is requesting your username and password. The site says: “some realm”",
|
||||
title : "Authentication Required",
|
||||
textValue : "outuser",
|
||||
passValue : "outpass",
|
||||
|
@ -189,7 +189,7 @@ add_task(function* test_cancel() {
|
|||
add_task(function* test_pwonly() {
|
||||
// test filling in password-only login
|
||||
state = {
|
||||
msg : "http://example.com is requesting your username and password.\n\nThe site says: “http://example.com”",
|
||||
msg : "http://example.com is requesting your username and password. The site says: “http://example.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "",
|
||||
passValue : "examplepass",
|
||||
|
@ -223,7 +223,7 @@ add_task(function* test_multipleExisting() {
|
|||
// test filling in existing login (undetermined from multiple selection)
|
||||
// user2name/user2pass would also be valid to fill here.
|
||||
state = {
|
||||
msg : "http://example2.com is requesting your username and password.\n\nThe site says: “http://example2.com”",
|
||||
msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "user1name",
|
||||
passValue : "user1pass",
|
||||
|
@ -257,7 +257,7 @@ add_task(function* test_multipleExisting2() {
|
|||
// test filling in existing login (undetermined --> user1)
|
||||
// user2name/user2pass would also be valid to fill here.
|
||||
state = {
|
||||
msg : "http://example2.com is requesting your username and password.\n\nThe site says: “http://example2.com”",
|
||||
msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "user1name",
|
||||
passValue : "user1pass",
|
||||
|
@ -294,7 +294,7 @@ add_task(function* test_multipleExisting3() {
|
|||
// test filling in existing login (undetermined --> user2)
|
||||
// user2name/user2pass would also be valid to fill here.
|
||||
state = {
|
||||
msg : "http://example2.com is requesting your username and password.\n\nThe site says: “http://example2.com”",
|
||||
msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "user1name",
|
||||
passValue : "user1pass",
|
||||
|
@ -331,7 +331,7 @@ add_task(function* test_changingMultiple() {
|
|||
// test changing a password (undetermined --> user2 w/ newpass)
|
||||
// user2name/user2pass would also be valid to fill here.
|
||||
state = {
|
||||
msg : "http://example2.com is requesting your username and password.\n\nThe site says: “http://example2.com”",
|
||||
msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "user1name",
|
||||
passValue : "user1pass",
|
||||
|
@ -368,7 +368,7 @@ add_task(function* test_changingMultiple2() {
|
|||
// test changing a password (undetermined --> user2 w/ origpass)
|
||||
// user2name/user2pass would also be valid to fill here.
|
||||
state = {
|
||||
msg : "http://example2.com is requesting your username and password.\n\nThe site says: “http://example2.com”",
|
||||
msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
|
||||
title : "Authentication Required",
|
||||
textValue : "user1name",
|
||||
passValue : "user1pass",
|
||||
|
|
|
@ -142,7 +142,7 @@ add_task(function* setup() {
|
|||
add_task(function* test_noAutologin() {
|
||||
// test proxy login (default = no autologin), make sure it prompts.
|
||||
state = {
|
||||
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password.\n\nThe site says: “Proxy Realm”",
|
||||
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password. The site says: “Proxy Realm”",
|
||||
title : "Authentication Required",
|
||||
textValue : "proxuser",
|
||||
passValue : "proxpass",
|
||||
|
@ -200,7 +200,7 @@ add_task(function* test_autologin() {
|
|||
add_task(function* test_autologin_incorrect() {
|
||||
// test proxy login (with autologin), ensure it prompts after a failed auth.
|
||||
state = {
|
||||
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password.\n\nThe site says: “Proxy Realm”",
|
||||
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password. The site says: “Proxy Realm”",
|
||||
title : "Authentication Required",
|
||||
textValue : "proxuser",
|
||||
passValue : "proxpass",
|
||||
|
|
|
@ -273,15 +273,15 @@ var PromptUtilsTemp = {
|
|||
|
||||
let text;
|
||||
if (isProxy) {
|
||||
text = PromptUtils.getLocalizedString("EnterLoginForProxy2", [realm, displayHost]);
|
||||
text = PromptUtils.getLocalizedString("EnterLoginForProxy3", [realm, displayHost]);
|
||||
} else if (isPassOnly) {
|
||||
text = PromptUtils.getLocalizedString("EnterPasswordFor", [username, displayHost]);
|
||||
} else if (isCrossOrig) {
|
||||
text = PromptUtils.getLocalizedString("EnterUserPasswordForCrossOrigin", [displayHost]);
|
||||
text = PromptUtils.getLocalizedString("EnterUserPasswordForCrossOrigin2", [displayHost]);
|
||||
} else if (!realm) {
|
||||
text = PromptUtils.getLocalizedString("EnterUserPasswordFor2", [displayHost]);
|
||||
} else {
|
||||
text = PromptUtils.getLocalizedString("EnterLoginForRealm2", [realm, displayHost]);
|
||||
text = PromptUtils.getLocalizedString("EnterLoginForRealm3", [realm, displayHost]);
|
||||
}
|
||||
|
||||
return text;
|
||||
|
|
|
@ -1020,7 +1020,7 @@ function* runTests() {
|
|||
// (promptAuth is only accessible from the prompt service)
|
||||
info("Starting test: promptAuth with long realm");
|
||||
state = {
|
||||
msg : 'http://example.com is requesting your username and password.\n\nThe site ' +
|
||||
msg : 'http://example.com is requesting your username and password. The site ' +
|
||||
'says: \u201cabcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ' +
|
||||
'abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ' +
|
||||
'abcdefghi \u2026\u201d',
|
||||
|
@ -1073,7 +1073,7 @@ function* runTests() {
|
|||
realm : ""
|
||||
}
|
||||
state = {
|
||||
msg : 'http://example.com is requesting your username and password.\n\n' +
|
||||
msg : 'http://example.com is requesting your username and password. ' +
|
||||
'WARNING: Your password will not be sent to the website you are currently visiting!',
|
||||
title : "TestTitle",
|
||||
iconClass : "authentication-icon question-icon",
|
||||
|
@ -1116,7 +1116,7 @@ function* runTests() {
|
|||
realm : "Something!!!"
|
||||
}
|
||||
state = {
|
||||
msg : 'http://example.com is requesting your username and password.\n\n' +
|
||||
msg : 'http://example.com is requesting your username and password. ' +
|
||||
'WARNING: Your password will not be sent to the website you are currently visiting!',
|
||||
title : "TestTitle",
|
||||
iconClass : "authentication-icon question-icon",
|
||||
|
|
|
@ -119,7 +119,7 @@ add_task(function* runTestAuth()
|
|||
|
||||
state = {
|
||||
msg : "http://mochi.test:8888 is requesting your username " +
|
||||
"and password.\n\nThe site says: “mochitest”",
|
||||
"and password. The site says: “mochitest”",
|
||||
title : "Authentication Required",
|
||||
textValue : "",
|
||||
passValue : "",
|
||||
|
@ -155,7 +155,7 @@ add_task(function* runTestAuth()
|
|||
// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
|
||||
isTabModal =false;
|
||||
state = {
|
||||
msg : "http://example.com is requesting your username and password.\n\n" +
|
||||
msg : "http://example.com is requesting your username and password. " +
|
||||
"WARNING: Your password will not be sent to the website you are currently visiting!",
|
||||
title : "Authentication Required",
|
||||
textValue : "",
|
||||
|
|
|
@ -20,13 +20,13 @@ ScriptDlgGenericHeading=[JavaScript Application]
|
|||
ScriptDlgHeading=The page at %S says:
|
||||
ScriptDialogLabel=Prevent this page from creating additional dialogs
|
||||
ScriptDialogPreventTitle=Confirm Dialog Preference
|
||||
# LOCALIZATION NOTE (EnterLoginForRealm2, EnterLoginForProxy2):
|
||||
# LOCALIZATION NOTE (EnterLoginForRealm3, EnterLoginForProxy3):
|
||||
# %1 is an untrusted string provided by a remote server. It could try to
|
||||
# take advantage of sentence structure in order to mislead the user (see
|
||||
# bug 244273). %1 should be integrated into the translated sentences as
|
||||
# little as possible. %2 is the url of the site being accessed.
|
||||
EnterLoginForRealm2=%2$S is requesting your username and password.\n\nThe site says: “%1$S”
|
||||
EnterLoginForProxy2=The proxy %2$S is requesting a username and password.\n\nThe site says: “%1$S”
|
||||
EnterLoginForRealm3=%2$S is requesting your username and password. The site says: “%1$S”
|
||||
EnterLoginForProxy3=The proxy %2$S is requesting a username and password. The site says: “%1$S”
|
||||
EnterUserPasswordFor2=%1$S is requesting your username and password.
|
||||
EnterUserPasswordForCrossOrigin=%1$S is requesting your username and password.\n\nWARNING: Your password will not be sent to the website you are currently visiting!
|
||||
EnterUserPasswordForCrossOrigin2=%1$S is requesting your username and password. WARNING: Your password will not be sent to the website you are currently visiting!
|
||||
EnterPasswordFor=Enter password for %1$S on %2$S
|
||||
|
|
Загрузка…
Ссылка в новой задаче