Unify message in the item details pane when trash contains collections or searches (#4696)

fix: #4688
This commit is contained in:
windingwind 2024-09-27 22:00:54 +02:00 • committed by GitHub
parent 3ffe736d99
commit f7a56efacf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -247,7 +247,15 @@
}
else {
let count = this.itemsView.rowCount;
msg = { l10nId: 'item-pane-message-unselected', l10nArgs: { count } };
if (this.collectionTreeRow.isTrash()
&& this.itemsView._rows?.some(
x => x.ref instanceof Zotero.Collection || x.ref instanceof Zotero.Search
)) {
msg = { l10nId: 'item-pane-message-objects-unselected', l10nArgs: { count } };
}
else {
msg = { l10nId: 'item-pane-message-unselected', l10nArgs: { count } };
}
}
this.setItemPaneMessage(msg);

View file

@ -615,6 +615,12 @@ item-pane-message-unselected = { $count ->
*[other] { $count } items in this view
}
item-pane-message-objects-unselected = { $count ->
[0] No objects in this view
[one] { $count } object in this view
*[other] { $count } objects in this view
}
item-pane-duplicates-merge-items =
.label = { $count ->
[one] Merge { $count } item