diff --git a/mail/components/addrbook/content/aboutAddressBook.js b/mail/components/addrbook/content/aboutAddressBook.js index c5996ae009..a4cfa05d27 100644 --- a/mail/components/addrbook/content/aboutAddressBook.js +++ b/mail/components/addrbook/content/aboutAddressBook.js @@ -958,12 +958,10 @@ class AbTreeListbox extends customElements.get("tree-listbox") { } _showContextMenu(event) { - let row; - if (event.target == this) { - row = this.rows[this.selectedIndex]; - } else { - row = event.target.closest("li"); - } + let row = + event.target == this + ? this.rows[this.selectedIndex] + : event.target.closest("li"); if (!row) { return; } @@ -997,6 +995,13 @@ class AbTreeListbox extends customElements.get("tree-listbox") { item.hidden = false; } + document.l10n.setAttributes( + document.getElementById("bookContextProperties"), + row.classList.contains("listRow") + ? "about-addressbook-books-context-edit-list" + : "about-addressbook-books-context-properties" + ); + synchronizeItem.hidden = !row.classList.contains("carddav"); exportItem.hidden = row.classList.contains("remote"); diff --git a/mail/components/addrbook/content/aboutAddressBook.xhtml b/mail/components/addrbook/content/aboutAddressBook.xhtml index 3c294d2d89..cfffb7d383 100644 --- a/mail/components/addrbook/content/aboutAddressBook.xhtml +++ b/mail/components/addrbook/content/aboutAddressBook.xhtml @@ -335,8 +335,7 @@ - +