MenuManager shows empty label

25 views
Skip to first unread message

Emiliano Heyns

unread,
Feb 18, 2026, 4:24:11 AMFeb 18
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,
Feb 18, 2026, 4:25:01 AMFeb 18
to zotero-dev

Emiliano Heyns

unread,
Feb 18, 2026, 4:33:50 AMFeb 18
to zotero-dev
Ah in the FTL! Thanks!

Emiliano Heyns

unread,
Feb 18, 2026, 4:38:52 AMFeb 18
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.

XY Wong

unread,
Feb 18, 2026, 7:47:04 AMFeb 18
to zotero-dev
Please check if the corresponding .ftl file is added to the document where the menu should be registered (I assume the main window in your screenshot), and if the ftl contains exactly the same keys (some libs, e.g. the scaffold, will namescope the ftl keys)

Emiliano Heyns

unread,
Feb 18, 2026, 8:06:37 AMFeb 18
to zotero-dev
I am adding it to the document, but how can I verify that I have done so correctly? I am not using scaffolds.

Emiliano Heyns

unread,
Feb 18, 2026, 8:07:27 AMFeb 18
to zotero-dev
(main window yes)

XY Wong

unread,
Feb 18, 2026, 10:22:49 AMFeb 18
to zotero-dev
Wait, is your ftl syntax correct?

It should be like

```
better-bibtex =
  .label = Better BibTeX
```

Emiliano Heyns

unread,
Feb 18, 2026, 10:26:55 AMFeb 18
to zotero-dev
that was it, thank you
Reply all
Reply to author
Forward
0 new messages