From 4411befc8ed3819b1fa3bbe5954e19a537155499 Mon Sep 17 00:00:00 2001 From: adeshkp Date: Thu, 26 Apr 2018 01:49:13 -0400 Subject: [Basilisk] Change button labels in cookies dialog --- browser/components/preferences/cookies.js | 19 +++++++++++++++++-- browser/components/preferences/cookies.xul | 2 -- .../en-US/chrome/browser/preferences/cookies.dtd | 7 ------- .../browser/preferences/preferences.properties | 20 +++++++++++++++++--- 4 files changed, 34 insertions(+), 14 deletions(-) (limited to 'browser') 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 @@