From d98fabc5abf0c82b013e5e5e9d6e8a0e59569517 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 3 Mar 2021 03:33:52 -0500 Subject: [PATCH] Add annotation type to schema --- chrome/content/zotero/xpcom/schema.js | 11 +---------- chrome/locale/en-US/zotero/zotero.properties | 1 + resource/schema/global | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 6f5fddb2bd..3f609991d8 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -344,18 +344,9 @@ Zotero.Schema = new function(){ * @return {Object} */ async function _readGlobalSchemaFromFile() { - var data = JSON.parse( + return JSON.parse( await Zotero.File.getResourceAsync('resource://zotero/schema/global/schema.json') ); - // TEMP: Add annotation to schema - // TODO: Move to schema.json - data.itemTypes.push({ - itemType: "annotation", - fields: [], - creatorTypes: [] - }); - data.locales['en-US'].itemTypes.annotation = 'Annotation'; - return data; } diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 90a1cdaff2..87e6c8a79a 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -407,6 +407,7 @@ pane.context.noNotes = No notes noteEditor.editNote = Edit Note itemTypes.note = Note +itemTypes.annotation = Annotation itemTypes.attachment = Attachment itemTypes.book = Book itemTypes.bookSection = Book Section diff --git a/resource/schema/global b/resource/schema/global index 68ad875567..7a5019893a 160000 --- a/resource/schema/global +++ b/resource/schema/global @@ -1 +1 @@ -Subproject commit 68ad875567b6bed4b6ebb2b5ee08bc6a272c2302 +Subproject commit 7a5019893a1af246f9ea53d9ceb927aee4d95c6c