зеркало из https://github.com/mozilla/pjs.git
fixing brain bustage. button labels and accesskeys should override the defaults ones in dialog.properties.
This commit is contained in:
Родитель
c07164644f
Коммит
bcc2f3516a
|
@ -207,14 +207,12 @@
|
||||||
|
|
||||||
// don't override custom labels with pre-defined labels on explicit buttons
|
// don't override custom labels with pre-defined labels on explicit buttons
|
||||||
if (!button.hasAttribute("label")) {
|
if (!button.hasAttribute("label")) {
|
||||||
// first look at the dialog attributes
|
// dialog attributes override the default labels in dialog.properties
|
||||||
if (this.hasAttribute("buttonlabel"+dlgtype))
|
if (this.hasAttribute("buttonlabel"+dlgtype)) {
|
||||||
button.setAttribute("label", this.getAttribute("buttonlabel"+dlgtype))
|
button.setAttribute("label", this.getAttribute("buttonlabel"+dlgtype));
|
||||||
if (this.hasAttribute("buttonaccesskey"+dlgtype))
|
if (this.hasAttribute("buttonaccesskey"+dlgtype))
|
||||||
button.setAttribute("accesskey", this.getAttribute("buttonaccesskey"+dlgtype))
|
button.setAttribute("accesskey", this.getAttribute("buttonaccesskey"+dlgtype));
|
||||||
|
} else if (dlgtype != "extra1" && dlgtype != "extra2") {
|
||||||
if (dlgtype != "extra1" && dlgtype != "extra2") {
|
|
||||||
// then at the localized dialog.properties file
|
|
||||||
button.setAttribute("label", this.mStrBundle.GetStringFromName("button-"+dlgtype));
|
button.setAttribute("label", this.mStrBundle.GetStringFromName("button-"+dlgtype));
|
||||||
var accessKey = this.mStrBundle.GetStringFromName("accesskey-"+dlgtype);
|
var accessKey = this.mStrBundle.GetStringFromName("accesskey-"+dlgtype);
|
||||||
if (accessKey)
|
if (accessKey)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче