Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions addon/locale/de/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = Neue Eintrags-Notiz aus Vorlage

menuCollection-exportNotes =
.label = Export Notes in Collection...

menuTab-moveNewWindow =
.label = In neues BN-Fenster verschieben
menu-openNoteAsBNWindow =
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/en-US/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = New Item Note from Template

menuCollection-exportNotes =
.label = Export Notes in Collection...

menuTab-moveNewWindow =
.label = Move to BN New Window
menu-openNoteAsBNWindow =
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/it-IT/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = Nuova Nota Elemento da Template

menuCollection-exportNotes =
.label = Export Notes in Collection...

menuTab-moveNewWindow =
.label = Move to BN New Window
menu-openNoteAsBNWindow =
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/ru-RU/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = Новая заметка элемента из шаблона

menuCollection-exportNotes =
.label = Export Notes in Collection...

menuTab-moveNewWindow =
.label = Move to BN New Window
menu-openNoteAsBNWindow =
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/tr-TR/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = Şablondan Yeni Öğe Notu

menuCollection-exportNotes =
.label = Export Notes in Collection...

menuTab-moveNewWindow =
.label = Move to BN New Window
menu-openNoteAsBNWindow =
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/zh-CN/mainWindow.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
menuAddNote-newTemplateItemNote =
.label = 从模板新建条目笔记

menuCollection-exportNotes =
.label = 导出分类中的笔记...

menuTab-moveNewWindow =
.label = 移动到 BN 新窗口
menu-openNoteAsBNWindow =
Expand Down
26 changes: 26 additions & 0 deletions src/modules/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,32 @@ export function registerMenus() {
],
});

Zotero.MenuManager.registerMenu({
menuID: `${config.addonRef}-menuCollectionExportNotes`,
pluginID: config.addonID,
target: "main/library/collection",
menus: [
{
menuType: "menuitem",
l10nID: `${config.addonRef}-menuCollection-exportNotes`,
icon: `chrome://${config.addonRef}/content/icons/favicon.png`,
onShowing: (_, context) => {
context.setVisible(context.collectionTreeRow?.type === "collection");
},
onCommand: (_, context) => {
const collection = context.collectionTreeRow
?.ref as Zotero.Collection | undefined;
if (!collection) {
return;
}
addon.hooks.onShowExportNoteOptions(
collection.getChildItems(true, false),
);
},
},
],
});

Zotero.MenuManager.registerMenu({
menuID: `${config.addonRef}-menuHelp`,
pluginID: config.addonID,
Expand Down
1 change: 1 addition & 0 deletions typings/i10n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export type FluentMessageId =
| 'menuAddNote-importMD'
| 'menuAddNote-newTemplateItemNote'
| 'menuAddNote-newTemplateStandaloneNote'
| 'menuCollection-exportNotes'
| 'menuEditor-copy'
| 'menuEditor-copyLine'
| 'menuEditor-copySection'
Expand Down
Loading