updating translated strings also before loading the menu items

This commit is contained in:
mic 2024-10-07 21:34:43 +02:00
parent 467ffaded9
commit d1beabf7a1

View file

@ -25,6 +25,7 @@ let taLog = console;
document.addEventListener('DOMContentLoaded', async () => { document.addEventListener('DOMContentLoaded', async () => {
let prefs = await browser.storage.sync.get({do_debug: false, dynamic_menu_force_enter: false}); let prefs = await browser.storage.sync.get({do_debug: false, dynamic_menu_force_enter: false});
taLog = new taLogger("mzta-popup",prefs.do_debug); taLog = new taLogger("mzta-popup",prefs.do_debug);
i18n.updateDocument();
let reponse = await browser.runtime.sendMessage({command: "popup_menu_ready"}); let reponse = await browser.runtime.sendMessage({command: "popup_menu_ready"});
taLog.log("Preparing data to load the popup menu: " + JSON.stringify(reponse)); taLog.log("Preparing data to load the popup menu: " + JSON.stringify(reponse));
let tabId = reponse.lastShortcutTabId; let tabId = reponse.lastShortcutTabId;