Locate menu: await l10n translation

Should reduce jank when opening the item context menu and sidenav
Locate menu, especially on Windows (where the flash of blank menuitems
lasted an especially long time for some reason).
This commit is contained in:
Abe Jellinek 2024-07-03 11:33:08 -04:00
parent 595eeeff6d
commit ee0df08cfb

View file

@ -82,10 +82,11 @@ var Zotero_LocateMenu = new function() {
}
}
var menuitem = document.createXULElement("menuitem");
menuitem = _createMenuItem(Zotero.getString("locate.manageLocateEngines"), "zotero-manage-locate-menu");
menuitem.addEventListener("command", _openLocateEngineManager, false);
locateMenu.appendChild(menuitem);
await document.l10n.translateFragment(locateMenu);
}
/**
@ -118,6 +119,8 @@ var Zotero_LocateMenu = new function() {
submenu.appendChild(submenuPopup);
menu.appendChild(submenu);
}*/
yield document.l10n.translateFragment(menu);
});
function _addViewOption(selectedItems, optionName, optionObject, showIcons) {