MenuManager shows empty label

6 views
Skip to first unread message

Emiliano Heyns

unread,
4:24 AM (2 hours ago) 4:24 AM
to zotero-dev
I am adding a menu, but it appears empty (and the items under it don't show at all). What am I doing wrong? I took this from the sample code at https://groups.google.com/g/zotero-dev/c/FgC_fJREceY/m/c4lI5ZqkAgAJ:

Zotero.MenuManager.registerMenu({
          menuID: `${pluginID}-menu-file`,
          pluginID,
          target: 'main/menubar/file',
          menus: [
            {
              menuType: 'submenu',
              l10nID: 'better-bibtex',
              menus: [
                // eslint-disable-next-line @typescript-eslint/no-misused-promises
                { menuType: 'menuitem', l10nID: 'better-bibtex_aux-scanner', onCommand: (_event, _context) => Zotero.BetterBibTeX.scanAUX('tag') },
                // eslint-disable-next-line @typescript-eslint/no-misused-promises
                { menuType: 'menuitem', l10nID: 'better-bibtex_report-errors', onCommand: (_event, _context) => Zotero.BetterBibTeX.ErrorReport.open() },
              ],
            },
          ],
        })

menu.jpeg

XY Wong

unread,
4:25 AM (2 hours ago) 4:25 AM
to zotero-dev

Emiliano Heyns

unread,
4:33 AM (2 hours ago) 4:33 AM
to zotero-dev
Ah in the FTL! Thanks!

Emiliano Heyns

unread,
4:38 AM (2 hours ago) 4:38 AM
to zotero-dev
OK so I now have

better-bibtex
  .label = Better BibTeX
better-bibtex_aux-scanner
  .label = Scan BibTeX AUX/Markdown file for references...
better-bibtex_report-errors
  .label = Send Better BibTeX debug log...

and the submenu items do show up now, but everything is still empty.
Reply all
Reply to author
Forward
0 new messages