Configuration used to translate role-based menu labels.
A structural subset of Electron.MenuItemConstructorOptions. We don't
import the electron package (it's not needed at runtime, and pulling
its types in would force a hard peer dependency), so this package works
against any object shaped like a menu item — including Electron's own
MenuItemConstructorOptions, which satisfies this interface.
English fallbacks for Electron's role-based menu items.
Looks up the localized label for a single role, without a full template. Useful for tray menus, context menus, or one-off items built by hand.
Recursively walks a Menu template and fills in label for any item that
has a role but no explicit label, using i18next translations with an
English fallback. Items that already set label are left untouched, so
you can mix manually-labeled and role-based items freely.
Translate Electron role-based native application menu labels with i18next in the main process while preserving native actions and accelerators.