Backed out changeset 08e729b36517 (bug 1371113) for failing browser_misused_characters_in_strings.js: cancelCreditCardLabel has a misused apostrophe. r=backout

This commit is contained in:
Sebastian Hengst 2017-08-28 10:17:47 +02:00
Родитель fd0f151bab
Коммит c6da0c0d11
3 изменённых файлов: 18 добавлений и 74 удалений

Просмотреть файл

@ -26,12 +26,10 @@ FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]);
const BUNDLE_URI = "chrome://formautofill/locale/formautofill.properties";
const GetStringFromName = Services.strings.createBundle(BUNDLE_URI).GetStringFromName;
let changeAutofillOptsKey = "changeAutofillOptions";
let autofillOptsKey = "autofillOptionsLink";
let autofillSecurityOptionsKey = "autofillSecurityOptionsLink";
if (AppConstants.platform == "macosx") {
let viewAutofillOptsKey = "viewAutofillOptionsLink";
if (AppConstants.platform != "macosx") {
changeAutofillOptsKey += "OSX";
autofillOptsKey += "OSX";
autofillSecurityOptionsKey += "OSX";
viewAutofillOptsKey += "OSX";
}
const CONTENT = {
@ -71,7 +69,6 @@ const CONTENT = {
update: {
notificationId: "autofill-address",
message: GetStringFromName("updateAddressMessage"),
linkMessage: GetStringFromName(autofillOptsKey),
anchor: {
id: "autofill-address-notification-icon",
URL: "chrome://formautofill/content/formfill-anchor.svg",
@ -92,34 +89,6 @@ const CONTENT = {
popupIconURL: "chrome://formautofill/content/icon-address-update.svg",
},
},
creditCard: {
notificationId: "autofill-credit-card",
message: GetStringFromName("saveCreditCardMessage"),
linkMessage: GetStringFromName(autofillSecurityOptionsKey),
anchor: {
id: "autofill-credit-card-notification-icon",
URL: "chrome://formautofill/content/formfill-anchor.svg",
tooltiptext: GetStringFromName("openAutofillMessagePanel"),
},
mainAction: {
label: GetStringFromName("saveCreditCardLabel"),
accessKey: "S",
callbackState: "save",
},
secondaryActions: [{
label: GetStringFromName("cancelCreditCardLabel"),
accessKey: "D",
callbackState: "cancel",
}, {
label: GetStringFromName("disableCreditCardLabel"),
accessKey: "N",
callbackState: "disable",
}],
options: {
persistWhileVisible: true,
popupIconURL: "chrome://formautofill/content/icon-credit-card.svg",
},
},
};
let FormAutofillDoorhanger = {
@ -167,10 +136,8 @@ let FormAutofillDoorhanger = {
* Target browser element for showing doorhanger.
* @param {string} id
* The ID of the doorhanger.
* @param {string} message
* The localized string for link title.
*/
_appendPrivacyPanelLink(browser, id, message) {
_appendPrivacyPanelLink(browser, id) {
let notificationId = id + "-notification";
let chromeDoc = browser.ownerDocument;
let notification = chromeDoc.getElementById(notificationId);
@ -181,7 +148,7 @@ let FormAutofillDoorhanger = {
privacyLinkElement.className = "text-link";
privacyLinkElement.setAttribute("useoriginprincipal", true);
privacyLinkElement.setAttribute("href", "about:preferences#privacy");
privacyLinkElement.setAttribute("value", message);
privacyLinkElement.setAttribute("value", GetStringFromName(viewAutofillOptsKey));
notificationcontent.appendChild(privacyLinkElement);
notification.append(notificationcontent);
}
@ -254,22 +221,13 @@ let FormAutofillDoorhanger = {
async show(browser, type) {
log.debug("show doorhanger with type:", type);
return new Promise((resolve) => {
let {
notificationId,
message,
linkMessage,
anchor,
mainAction,
secondaryActions,
options,
} = CONTENT[type];
let content = CONTENT[type];
let chromeWin = browser.ownerGlobal;
options.eventCallback = (topic) => {
content.options.eventCallback = (topic) => {
log.debug("eventCallback:", topic);
if (topic == "removed" || topic == "dismissed") {
this._removeCheckboxListener(browser, {notificationId, options});
this._removeCheckboxListener(browser, content);
return;
}
@ -277,23 +235,23 @@ let FormAutofillDoorhanger = {
if (topic != "shown") {
return;
}
this._addCheckboxListener(browser, {notificationId, options});
this._addCheckboxListener(browser, content);
// There's no preferences link or other customization in first time use doorhanger.
if (type == "firstTimeUse") {
return;
}
this._appendPrivacyPanelLink(browser, notificationId, linkMessage);
this._appendPrivacyPanelLink(browser, content.notificationId);
};
this._setAnchor(browser, anchor);
this._setAnchor(browser, content.anchor);
chromeWin.PopupNotifications.show(
browser,
notificationId,
message,
anchor.id,
...this._createActions(mainAction, secondaryActions, resolve),
options,
content.notificationId,
content.message,
content.anchor.id,
...this._createActions(content.mainAction, content.secondaryActions, resolve),
content.options,
);
});
},

Просмотреть файл

@ -1,8 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path fill="#4E4D4D" d="M9 22.2H6.4c-.6 0-1 .4-1 1s.4 1 1 1H9c.6 0 1-.4 1-1s-.4-1-1-1z"/>
<path fill="#4E4D4D" d="M28 7.6v8H4v-4h10v-4H4c-2.2 0-4 1.8-4 4v16c0 2.2 1.8 4 4 4h24c2.2 0 4-1.8 4-4v-16c0-2.2-1.8-4-4-4zm-24 20V19h24v8.6H4z"/>
<path fill="#4E4D4D" d="M19.2 22.2h-6.3c-.6 0-1 .4-1 1s.4 1 1 1h6.3c.6 0 1-.4 1-1s-.5-1-1-1zM16.3 7.9c-.4.4-.4 1 0 1.4l4 4c.4.4 1 .4 1.4 0l4-4c.4-.4.4-1 0-1.4s-1-.4-1.4 0L22 10.2v-9c0-.5-.4-1-1-1-.5 0-1 .4-1 1v9l-2.3-2.3c-.4-.4-1-.4-1.4 0z"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 765 B

Просмотреть файл

@ -8,20 +8,14 @@ savedAddresses = Saved Addresses…
enableCreditCardAutofill = Autofill credit cards
savedCreditCards = Saved Credit Cards…
saveAddressesMessage = Firefox now saves addresses so you can fill out forms faster.
autofillOptionsLink = Form Autofill Options
autofillSecurityOptionsLink = Form Autofill & Security Options
viewAutofillOptionsLink = View Form Autofill Options
changeAutofillOptions = Change Form Autofill Options
autofillOptionsLinkOSX = Form Autofill Preferences
autofillSecurityOptionsLinkOSX = Form Autofill & Security Preferences
viewAutofillOptionsLinkOSX = View Form Autofill Preferences
changeAutofillOptionsOSX = Change Form Autofill Preferences
addressesSyncCheckbox = Share addresses with synced devices
updateAddressMessage = Would you like to update your address with this new information?
createAddressLabel = Create New Address
updateAddressLabel = Update Address
saveCreditCardMessage = Would you like Firefox to save this credit card? (Security code will not be saved)
saveCreditCardLabel = Save Credit Card
cancelCreditCardLabel = Don't Save
disableCreditCardLabel = Never Save credit Cards
openAutofillMessagePanel = Open Form Autofill message panel
autocompleteFooterOption = Form Autofill Options
autocompleteFooterOptionShort = More Options