Bug 1415263 - [Form Autofill] Make accesskeys in form autofill doorhanger localizable. r=lchang
authorsteveck-chung <schung@mozilla.com>
Thu, 09 Nov 2017 12:06:30 +0800
changeset 444494 40f071c58bf9fc1d6c3afcea0267d5f98ad523a6
parent 444493 f296220f41172e899e585354439d37877aada199
child 444495 e7f0ad15263103e680bfd1d17e37497cc349106a
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslchang
bugs1415263
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415263 - [Form Autofill] Make accesskeys in form autofill doorhanger localizable. r=lchang MozReview-Commit-ID: 1sAoPhYT9le
browser/extensions/formautofill/FormAutofillDoorhanger.jsm
browser/extensions/formautofill/locales/en-US/formautofill.properties
--- a/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
+++ b/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
@@ -41,17 +41,17 @@ const CONTENT = {
     message: formatStringFromName("saveAddressesMessage", [brandShortName], 1),
     anchor: {
       id: "autofill-address-notification-icon",
       URL: "chrome://formautofill/content/formfill-anchor.svg",
       tooltiptext: GetStringFromName("openAutofillMessagePanel"),
     },
     mainAction: {
       label: GetStringFromName(changeAutofillOptsKey),
-      accessKey: "C",
+      accessKey: GetStringFromName("changeAutofillOptionsAccessKey"),
       callbackState: "open-pref",
       disableHighlight: true,
     },
     options: {
       persistWhileVisible: true,
       popupIconURL: "chrome://formautofill/content/icon-address-save.svg",
       checkbox: {
         get checked() {
@@ -77,22 +77,22 @@ const CONTENT = {
     linkMessage: GetStringFromName(autofillOptsKey),
     anchor: {
       id: "autofill-address-notification-icon",
       URL: "chrome://formautofill/content/formfill-anchor.svg",
       tooltiptext: GetStringFromName("openAutofillMessagePanel"),
     },
     mainAction: {
       label: GetStringFromName("updateAddressLabel"),
-      accessKey: "U",
+      accessKey: GetStringFromName("updateAddressAccessKey"),
       callbackState: "update",
     },
     secondaryActions: [{
       label: GetStringFromName("createAddressLabel"),
-      accessKey: "C",
+      accessKey: GetStringFromName("createAddressAccessKey"),
       callbackState: "create",
     }],
     options: {
       persistWhileVisible: true,
       popupIconURL: "chrome://formautofill/content/icon-address-update.svg",
       hideClose: true,
     },
   },
@@ -102,26 +102,26 @@ const CONTENT = {
     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",
+      accessKey: GetStringFromName("saveCreditCardAccessKey"),
       callbackState: "save",
     },
     secondaryActions: [{
       label: GetStringFromName("cancelCreditCardLabel"),
-      accessKey: "D",
+      accessKey: GetStringFromName("cancelCreditCardAccessKey"),
       callbackState: "cancel",
     }, {
       label: GetStringFromName("neverSaveCreditCardLabel"),
-      accessKey: "N",
+      accessKey: GetStringFromName("neverSaveCreditCardAccessKey"),
       callbackState: "disable",
     }],
     options: {
       persistWhileVisible: true,
       popupIconURL: "chrome://formautofill/content/icon-credit-card.svg",
       hideClose: true,
       checkbox: {
         get checked() {
@@ -155,22 +155,22 @@ const CONTENT = {
     linkMessage: GetStringFromName(autofillOptsKey),
     anchor: {
       id: "autofill-credit-card-notification-icon",
       URL: "chrome://formautofill/content/formfill-anchor.svg",
       tooltiptext: GetStringFromName("openAutofillMessagePanel"),
     },
     mainAction: {
       label: GetStringFromName("updateCreditCardLabel"),
-      accessKey: "U",
+      accessKey: GetStringFromName("updateCreditCardAccessKey"),
       callbackState: "update",
     },
     secondaryActions: [{
       label: GetStringFromName("createCreditCardLabel"),
-      accessKey: "C",
+      accessKey: GetStringFromName("createCreditCardAccessKey"),
       callbackState: "create",
     }],
     options: {
       persistWhileVisible: true,
       popupIconURL: "chrome://formautofill/content/icon-credit-card.svg",
       hideClose: true,
     },
   },
--- a/browser/extensions/formautofill/locales/en-US/formautofill.properties
+++ b/browser/extensions/formautofill/locales/en-US/formautofill.properties
@@ -12,39 +12,47 @@ autofillOptionsLinkOSX = Form Autofill P
 # LOCALIZATION NOTE (autofillSecurityOptionsLink, autofillSecurityOptionsLinkOSX): These strings are used
 # in the doorhanger for saving credit card info. The link leads users to Form Autofill browser preferences.
 autofillSecurityOptionsLink = Form Autofill & Security Options
 autofillSecurityOptionsLinkOSX = Form Autofill & Security Preferences
 # LOCALIZATION NOTE (changeAutofillOptions, changeAutofillOptionsOSX): These strings are used on the doorhanger
 # that notifies users that addresses are saved. The button leads users to Form Autofill browser preferences.
 changeAutofillOptions = Change Form Autofill Options
 changeAutofillOptionsOSX = Change Form Autofill Preferences
+changeAutofillOptionsAccessKey = C
 # LOCALIZATION NOTE (addressesSyncCheckbox): If Sync is enabled, this checkbox is displayed on the doorhanger
 # shown when saving addresses.
 addressesSyncCheckbox = Share addresses with synced devices
 # LOCALIZATION NOTE (creditCardsSyncCheckbox): If Sync is enabled and credit card sync is available,
 # this checkbox is displayed on the doorhanger shown when saving credit card.
 creditCardsSyncCheckbox = Share credit cards with synced devices
 # LOCALIZATION NOTE (updateAddressMessage, createAddressLabel, updateAddressLabel): Used on the doorhanger
 # when an address change is detected.
 updateAddressMessage = Would you like to update your address with this new information?
 createAddressLabel = Create New Address
+createAddressAccessKey = C
 updateAddressLabel = Update Address
+updateAddressAccessKey = U
 # LOCALIZATION NOTE (saveCreditCardMessage, saveCreditCardLabel, cancelCreditCardLabel, neverSaveCreditCardLabel):
 # Used on the doorhanger when users submit payment with credit card.
 # LOCALIZATION NOTE (saveCreditCardMessage): %S is brandShortName.
 saveCreditCardMessage = Would you like %S to save this credit card? (Security code will not be saved)
 saveCreditCardLabel = Save Credit Card
+saveCreditCardAccessKey = S
 cancelCreditCardLabel = Don’t Save
+cancelCreditCardAccessKey = D
 neverSaveCreditCardLabel = Never Save Credit Cards
+neverSaveCreditCardAccessKey = N
 # LOCALIZATION NOTE (updateCreditCardMessage, createCreditCardLabel, updateCreditCardLabel): Used on the doorhanger
 # when an credit card change is detected.
 updateCreditCardMessage = Would you like to update your credit card with this new information?
 createCreditCardLabel = Create New Credit Card
+createCreditCardAccessKey = C
 updateCreditCardLabel = Update Credit Card
+updateCreditCardAccessKey = U
 # LOCALIZATION NOTE (openAutofillMessagePanel): Tooltip label for Form Autofill doorhanger icon on address bar.
 openAutofillMessagePanel = Open Form Autofill message panel
 
 # LOCALIZATION NOTE (autocompleteFooterOption, autocompleteFooterOptionOSX): Used as a label for the button,
 # displayed at the bottom of the drop down suggestion, to open Form Autofill browser preferences.
 autocompleteFooterOption = Form Autofill Options
 autocompleteFooterOptionOSX = Form Autofill Preferences
 # LOCALIZATION NOTE (autocompleteFooterOptionShort, autocompleteFooterOptionOSXShort): Used as a label for the button,