summaryrefslogtreecommitdiffstats
path: root/browser
diff options
context:
space:
mode:
authoradeshkp <adeshkp@users.noreply.github.com>2018-04-26 01:49:13 -0400
committeradeshkp <adeshkp@users.noreply.github.com>2018-04-26 01:49:13 -0400
commit4411befc8ed3819b1fa3bbe5954e19a537155499 (patch)
tree34c628aac414c9fe5ad20dd5a01e7550111df7a6 /browser
parenteca7e648bfc7d3b9b4bdd88561af6bca4a677cef (diff)
downloadUXP-4411befc8ed3819b1fa3bbe5954e19a537155499.tar
UXP-4411befc8ed3819b1fa3bbe5954e19a537155499.tar.gz
UXP-4411befc8ed3819b1fa3bbe5954e19a537155499.tar.lz
UXP-4411befc8ed3819b1fa3bbe5954e19a537155499.tar.xz
UXP-4411befc8ed3819b1fa3bbe5954e19a537155499.zip
[Basilisk] Change button labels in cookies dialog
Diffstat (limited to 'browser')
-rw-r--r--browser/components/preferences/cookies.js19
-rw-r--r--browser/components/preferences/cookies.xul2
-rw-r--r--browser/locales/en-US/chrome/browser/preferences/cookies.dtd7
-rw-r--r--browser/locales/en-US/chrome/browser/preferences/preferences.properties20
4 files changed, 34 insertions, 14 deletions
diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js
index 1042642da..921eee4c0 100644
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -30,6 +30,11 @@ var gCookiesWindow = {
this._bundle = document.getElementById("bundlePreferences");
this._tree = document.getElementById("cookiesList");
+ let removeAllCookies = document.getElementById("removeAllCookies");
+ removeAllCookies.setAttribute("accesskey", this._bundle.getString("removeAllCookies.accesskey"));
+ let removeSelectedCookies = document.getElementById("removeSelectedCookies");
+ removeSelectedCookies.setAttribute("accesskey", this._bundle.getString("removeSelectedCookies.accesskey"));
+
this._populateList(true);
document.getElementById("filter").focus();
@@ -582,7 +587,7 @@ var gCookiesWindow = {
}
}
- let buttonLabel = this._bundle.getString("removeSelectedCookies");
+ let buttonLabel = this._bundle.getString("removeSelectedCookies.label");
let removeSelectedCookies = document.getElementById("removeSelectedCookies");
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
.replace("#1", selectedCookieCount);
@@ -894,7 +899,17 @@ var gCookiesWindow = {
},
_updateRemoveAllButton: function gCookiesWindow__updateRemoveAllButton() {
- document.getElementById("removeAllCookies").disabled = this._view._rowCount == 0;
+ let removeAllCookies = document.getElementById("removeAllCookies");
+ removeAllCookies.disabled = this._view._rowCount == 0;
+
+ let labelStringID = "removeAllCookies.label";
+ let accessKeyStringID = "removeAllCookies.accesskey";
+ if (this._view._filtered) {
+ labelStringID = "removeAllShownCookies.label";
+ accessKeyStringID = "removeAllShownCookies.accesskey";
+ }
+ removeAllCookies.setAttribute("label", this._bundle.getString(labelStringID));
+ removeAllCookies.setAttribute("accesskey", this._bundle.getString(accessKeyStringID));
},
filter: function () {
diff --git a/browser/components/preferences/cookies.xul b/browser/components/preferences/cookies.xul
index cda6ea220..bd60d9346 100644
--- a/browser/components/preferences/cookies.xul
+++ b/browser/components/preferences/cookies.xul
@@ -96,10 +96,8 @@
<hbox align="end">
<hbox class="actionButtons" flex="1">
<button id="removeSelectedCookies" disabled="true" icon="clear"
- accesskey="&button.removeSelectedCookies.accesskey;"
oncommand="gCookiesWindow.deleteCookie();"/>
<button id="removeAllCookies" disabled="true" icon="clear"
- label="&button.removeAllCookies.label;" accesskey="&button.removeAllCookies.accesskey;"
oncommand="gCookiesWindow.deleteAllCookies();"/>
<spacer flex="1"/>
#ifndef XP_MACOSX
diff --git a/browser/locales/en-US/chrome/browser/preferences/cookies.dtd b/browser/locales/en-US/chrome/browser/preferences/cookies.dtd
index 9dfafffa5..5e7df9609 100644
--- a/browser/locales/en-US/chrome/browser/preferences/cookies.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/cookies.dtd
@@ -7,13 +7,6 @@
<!ENTITY cookiesonsystem.label "The following cookies are stored on your computer:">
<!ENTITY cookiename.label "Cookie Name">
<!ENTITY cookiedomain.label "Site">
-<!-- LOCALIZATION NOTE (button.removeSelectedCookies.accesskey):
- The label associated with this accesskey can be found in
- preferences.properties as removeSelectedCookies.
--->
-<!ENTITY button.removeSelectedCookies.accesskey "R">
-<!ENTITY button.removeAllCookies.label "Remove All">
-<!ENTITY button.removeAllCookies.accesskey "A">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">
diff --git a/browser/locales/en-US/chrome/browser/preferences/preferences.properties b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
index bf9ac602b..da40f40a9 100644
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -21,7 +21,7 @@ acceptVeryLargeMinimumFont=Keep my changes anyway
trackingprotectionpermissionstext=You have disabled Tracking Protection on these sites.
trackingprotectionpermissionstitle=Exceptions - Tracking Protection
-cookiepermissionstext=You can specify which websites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
+cookiepermissionstext=You can specify which websites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstitle=Exceptions - Cookies
addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addons_permissions_title=Allowed Sites - Add-ons Installation
@@ -123,6 +123,18 @@ cannot=Block
noCookieSelected=<no cookie selected>
cookiesAll=The following cookies are stored on your computer:
cookiesFiltered=The following cookies match your search:
+
+# LOCALIZATION NOTE (removeAllCookies, removeAllShownCookies):
+# removeAllCookies and removeAllShownCookies are both used on the same one button,
+# never displayed together and can share the same accesskey.
+# When only partial cookies are shown as a result of keyword search,
+# removeAllShownCookies is displayed as button label.
+# removeAllCookies is displayed when no keyword search and all cookies are shown.
+removeAllCookies.label=Remove All
+removeAllCookies.accesskey=A
+removeAllShownCookies.label=Remove All Shown
+removeAllShownCookies.accesskey=A
+
# LOCALIZATION NOTE (removeSelectedCookies):
# Semicolon-separated list of plural forms. See:
# http://developer.mozilla.org/en/docs/Localization_and_Plurals
@@ -130,13 +142,15 @@ cookiesFiltered=The following cookies match your search:
# you can use #1 in your localization as a placeholder for the number.
# For example this is the English string with numbers:
# removeSelectedCookied=Remove #1 Selected;Remove #1 Selected
-removeSelectedCookies=Remove Selected;Remove Selected
+removeSelectedCookies.label=Remove Selected;Remove Selected
+removeSelectedCookies.accesskey=R
+
defaultUserContextLabel=None
#### Offline apps
offlineAppsList.height=7em
offlineAppRemoveTitle=Remove offline website data
-offlineAppRemovePrompt=After removing this data, %S will not be available offline. Are you sure you want to remove this offline website?
+offlineAppRemovePrompt=After removing this data, %S will not be available offline. Are you sure you want to remove this offline website?
offlineAppRemoveConfirm=Remove offline data
# LOCALIZATION NOTE: The next string is for the disk usage of the