Skip to content

Commit

Permalink
Bug 1277895 - Remove one new line from http auth prompt message. r=do…
Browse files Browse the repository at this point in the history
…lske
  • Loading branch information
ddragana committed Sep 16, 2016
1 parent 56c54a3 commit 28e4754
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion extensions/gio/nsGIOProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() };
Expand Down
6 changes: 3 additions & 3 deletions mobile/android/components/PromptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

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",
Expand Down Expand Up @@ -110,7 +110,7 @@
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",
Expand Down Expand Up @@ -151,7 +151,7 @@
// 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",
Expand Down Expand Up @@ -183,7 +183,7 @@
// 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",
Expand Down Expand Up @@ -229,7 +229,7 @@
});

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 : "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

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",
Expand Down Expand Up @@ -162,7 +162,7 @@

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",
Expand All @@ -189,7 +189,7 @@
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",
Expand Down Expand Up @@ -223,7 +223,7 @@
// 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",
Expand Down Expand Up @@ -257,7 +257,7 @@
// 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",
Expand Down Expand Up @@ -294,7 +294,7 @@
// 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",
Expand Down Expand Up @@ -331,7 +331,7 @@
// 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",
Expand Down Expand Up @@ -368,7 +368,7 @@
// 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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
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",
Expand Down Expand Up @@ -200,7 +200,7 @@
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",
Expand Down
6 changes: 3 additions & 3 deletions toolkit/components/prompts/src/nsPrompter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions toolkit/components/prompts/test/test_modal_prompts.html
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@
// (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',
Expand Down Expand Up @@ -1073,7 +1073,7 @@
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",
Expand Down Expand Up @@ -1116,7 +1116,7 @@
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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

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 : "",
Expand Down Expand Up @@ -155,7 +155,7 @@
// 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 : "",
Expand Down
8 changes: 4 additions & 4 deletions toolkit/locales/en-US/chrome/global/commonDialogs.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 28e4754

Please sign in to comment.