mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-07-21 03:48:43 +00:00
Merge pull request #269 from adeshkp/button_messages
Improve some button labels in preferences
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
const nsICookie = Components.interfaces.nsICookie;
|
||||
|
||||
Components.utils.import("resource://gre/modules/PluralForm.jsm");
|
||||
|
||||
var gCookiesWindow = {
|
||||
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
|
||||
.getService(Components.interfaces.nsICookieManager),
|
||||
@@ -24,6 +26,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();
|
||||
@@ -558,12 +565,12 @@ var gCookiesWindow = {
|
||||
if (item && seln.count == 1 && item.container && item.open)
|
||||
selectedCookieCount += 2;
|
||||
|
||||
var removeCookie = document.getElementById("removeCookie");
|
||||
var removeCookies = document.getElementById("removeCookies");
|
||||
removeCookie.parentNode.selectedPanel =
|
||||
selectedCookieCount == 1 ? removeCookie : removeCookies;
|
||||
let buttonLabel = this._bundle.getString("removeSelectedCookies.label");
|
||||
let removeSelectedCookies = document.getElementById("removeSelectedCookies");
|
||||
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
|
||||
.replace("#1", selectedCookieCount);
|
||||
|
||||
removeCookie.disabled = removeCookies.disabled = !(seln.count > 0);
|
||||
removeSelectedCookies.disabled = !(seln.count > 0);
|
||||
},
|
||||
|
||||
performDeletion: function gCookiesWindow_performDeletion(deleteItems) {
|
||||
@@ -868,7 +875,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 () {
|
||||
|
||||
@@ -91,16 +91,9 @@
|
||||
</vbox>
|
||||
<hbox align="end">
|
||||
<hbox class="actionButtons" flex="1">
|
||||
<deck oncommand="gCookiesWindow.deleteCookie();">
|
||||
<button id="removeCookie" disabled="true" icon="remove"
|
||||
label="&button.removecookie.label;"
|
||||
accesskey="&button.removecookie.accesskey;"/>
|
||||
<button id="removeCookies" disabled="true" icon="remove"
|
||||
label="&button.removecookies.label;"
|
||||
accesskey="&button.removecookie.accesskey;"/>
|
||||
</deck>
|
||||
<button id="removeSelectedCookies" disabled="true" icon="clear"
|
||||
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
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
<!ENTITY cookiesonsystem.label "The following cookies are stored on your computer:">
|
||||
<!ENTITY cookiename.label "Cookie Name">
|
||||
<!ENTITY cookiedomain.label "Site">
|
||||
<!ENTITY button.removecookies.label "Remove Cookies">
|
||||
<!ENTITY button.removecookie.label "Remove Cookie">
|
||||
<!ENTITY button.removecookie.accesskey "R">
|
||||
<!ENTITY button.removeallcookies.label "Remove All Cookies">
|
||||
<!ENTITY button.removeallcookies.accesskey "A">
|
||||
|
||||
<!ENTITY props.name.label "Name:">
|
||||
<!ENTITY props.value.label "Content:">
|
||||
|
||||
+23
-2
@@ -15,7 +15,7 @@ labelDefaultFont=Default (%S)
|
||||
|
||||
#### Permissions Manager
|
||||
|
||||
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
|
||||
@@ -93,9 +93,30 @@ 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
|
||||
# If you need to display the number of selected elements in your language,
|
||||
# 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.label=Remove Selected;Remove Selected
|
||||
removeSelectedCookies.accesskey=R
|
||||
|
||||
#### Offline apps
|
||||
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
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -80,6 +80,8 @@ function Startup() {
|
||||
togglePasswordsButton.label = kSignonBundle.getString("showPasswords");
|
||||
togglePasswordsButton.accessKey = kSignonBundle.getString("showPasswordsAccessKey");
|
||||
signonsIntro.textContent = kSignonBundle.getString("loginsDescriptionAll");
|
||||
removeAllButton.setAttribute("label", kSignonBundle.getString("removeAll.label"));
|
||||
removeAllButton.setAttribute("accesskey", kSignonBundle.getString("removeAll.accesskey"));
|
||||
document.getElementsByTagName("treecols")[0].addEventListener("click", (event) => {
|
||||
let { target, button } = event;
|
||||
let sortField = target.getAttribute("data-field-name");
|
||||
@@ -555,6 +557,8 @@ function SignonClearFilter() {
|
||||
signonsTreeView._lastSelectedRanges = [];
|
||||
|
||||
signonsIntro.textContent = kSignonBundle.getString("loginsDescriptionAll");
|
||||
removeAllButton.setAttribute("label", kSignonBundle.getString("removeAll.label"));
|
||||
removeAllButton.setAttribute("accesskey", kSignonBundle.getString("removeAll.accesskey"));
|
||||
}
|
||||
|
||||
function FocusFilterBox() {
|
||||
@@ -623,6 +627,8 @@ function FilterPasswords() {
|
||||
signonsTreeView.selection.select(0);
|
||||
|
||||
signonsIntro.textContent = kSignonBundle.getString("loginsDescriptionFiltered");
|
||||
removeAllButton.setAttribute("label", kSignonBundle.getString("removeAllShown.label"));
|
||||
removeAllButton.setAttribute("accesskey", kSignonBundle.getString("removeAllShown.accesskey"));
|
||||
}
|
||||
|
||||
function CopyPassword() {
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
label="&remove.label;" accesskey="&remove.accesskey;"
|
||||
oncommand="DeleteSignon();"/>
|
||||
<button id="removeAllSignons" icon="clear"
|
||||
label="&removeall.label;" accesskey="&removeall.accesskey;"
|
||||
oncommand="DeleteAllSignons();"/>
|
||||
<spacer flex="1"/>
|
||||
#if defined(MC_BASILISK) && defined(XP_WIN)
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
<!ENTITY remove.label "Remove">
|
||||
<!ENTITY remove.accesskey "R">
|
||||
<!ENTITY removeall.label "Remove All">
|
||||
<!ENTITY removeall.accesskey "A">
|
||||
|
||||
<!ENTITY addLogin.label "Add Login">
|
||||
<!ENTITY addLogin.accesskey "L">
|
||||
|
||||
@@ -68,3 +68,14 @@ duplicateLogin=A duplicate login already exists.
|
||||
|
||||
insecureFieldWarningDescription = This connection is not secure. Logins entered here could be compromised.
|
||||
insecureFieldWarningLearnMore = Learn More
|
||||
|
||||
# LOCALIZATION NOTE (removeAll, removeAllShown):
|
||||
# removeAll and removeAllShown are both used on the same one button,
|
||||
# never displayed together and can share the same accesskey.
|
||||
# When only partial sites are shown as a result of keyword search,
|
||||
# removeAllShown is displayed as button label.
|
||||
# removeAll is displayed when no keyword search and all sites are shown.
|
||||
removeAll.label=Remove All
|
||||
removeAll.accesskey=A
|
||||
removeAllShown.label=Remove All Shown
|
||||
removeAllShown.accesskey=A
|
||||
|
||||
Reference in New Issue
Block a user