From 8627e92cb41ffbba8e2d41169715680073ea87ca Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Wed, 29 Nov 2023 12:06:53 +0100 Subject: [PATCH] Fix items table potentially not rendering after merge In d4f8c7c an entry has been removed from zotero.properties that is still being used in items table. If `numNotes` column is visible, items table would not render. Instead of re-adding to zotero.properties, I've migrated this string to zotero.ftl to fix this problem. --- chrome/content/zotero/itemTree.jsx | 3 ++- chrome/locale/en-US/zotero/zotero.ftl | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 99a012c0ea..2bfeaf6ad6 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -2814,7 +2814,8 @@ var ItemTree = class ItemTree extends LibraryTree { else { cell = renderCell.apply(this, arguments); if (column.dataKey === 'numNotes' && data) { - cell.setAttribute('aria-label', Zotero.getString('pane.item.notes.count', data, data) + '.'); + cell.dataset.l10nId = 'items-table-cell-notes'; + cell.dataset.l10nArgs = JSON.stringify({ count: data }); } else if (column.dataKey === 'itemType') { cell.setAttribute('aria-hidden', true); diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index 1a176ce447..3124d1af0c 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -87,6 +87,12 @@ import-online-relink-only = .label = Relink Mendeley Desktop citations import-online-relink-kb = More Information +items-table-cell-notes = + .aria-label = { $count -> + [one] { $count } Note + *[other] { $count } Notes + } + report-error = .label = Report Error…