Bug 1315458 - Container management: Make "Preferences" and "Remove" buttons localizable. r?jkt
MozReview-Commit-ID: 893cnROEPWf
--- a/browser/components/preferences/handlers.xml
+++ b/browser/components/preferences/handlers.xml
@@ -3,18 +3,20 @@
<!-- 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/. -->
<!-- import-globals-from in-content/applications.js -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % applicationsDTD SYSTEM "chrome://browser/locale/preferences/applications.dtd">
+ <!ENTITY % containersDTD SYSTEM "chrome://browser/locale/preferences/containers.dtd">
%brandDTD;
%applicationsDTD;
+ %containersDTD;
]>
<bindings id="handlerBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="handler-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
@@ -73,24 +75,24 @@
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
<xul:hbox xbl:inherits="data-identity-icon=containerIcon,data-identity-color=containerColor" height="24" width="24" class="userContext-icon"/>
<xul:label flex="1" crop="end" xbl:inherits="value=containerName"/>
</xul:hbox>
<xul:hbox flex="1" align="right">
<xul:button anonid="preferencesButton"
+ label="&preferencesButton.label;"
xbl:inherits="value=userContextId"
- onclick="gContainersPane.onPeferenceClick(event.originalTarget)">
- Preferences
+ onclick="gContainersPane.onPreferenceClick(event.originalTarget)">
</xul:button>
<xul:button anonid="removeButton"
+ label="&removeButton.label;"
xbl:inherits="value=userContextId"
onclick="gContainersPane.onRemoveClick(event.originalTarget)">
- Remove
</xul:button>
</xul:hbox>
</xul:hbox>
</content>
</binding>
<binding id="offlineapp"
extends="chrome://global/content/bindings/listbox.xml#listitem">
--- a/browser/components/preferences/in-content/containers.js
+++ b/browser/components/preferences/in-content/containers.js
@@ -62,17 +62,17 @@ let gContainersPane = {
ContextualIdentityService.closeContainerTabs(userContextId);
}
ContextualIdentityService.remove(userContextId);
this._rebuildView();
},
- onPeferenceClick(button) {
+ onPreferenceClick(button) {
this.openPreferenceDialog(button.getAttribute("value"));
},
onAddButtonClick(button) {
this.openPreferenceDialog(null);
},
openPreferenceDialog(userContextId) {
--- a/browser/locales/en-US/chrome/browser/preferences/containers.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/containers.dtd
@@ -1,15 +1,17 @@
<!-- 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/. -->
<!ENTITY label.label "Name">
<!ENTITY addButton.label "Add New Container">
<!ENTITY addButton.accesskey "A">
+<!ENTITY preferencesButton.label "Preferences">
+<!ENTITY removeButton.label "Remove">
<!-- « is « however it's not defined in XML -->
<!ENTITY backLink.label "« Go Back to Privacy">
<!ENTITY window.title "Add New Container">
<!ENTITY window.width "45em">
<!ENTITY name.label "Name:">
<!ENTITY name.accesskey "N">
--- a/browser/locales/en-US/chrome/browser/preferences/containers.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/containers.properties
@@ -1,14 +1,12 @@
# 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/.
-containers.removeButton = Remove
-containers.preferencesButton = Preferences
containers.colorHeading = Color:
containers.labelMinWidth = 4rem
containers.nameLabel = Name:
containers.namePlaceholder = Enter a container name
containers.submitButton = Done
containers.iconHeading = Icon:
containers.updateContainerTitle = %S Container Preferences