Skip to content

Commit

Permalink
Enable i18next translations in popup window - bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
pczyzyk committed May 31, 2023
1 parent d36acaa commit 6af1020
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/electron/main.js
Expand Up @@ -270,6 +270,11 @@ app.on("web-contents-created", (event, contents) => {
contents.on("did-create-window", (window) => {
i18nextBackend.mainBindings(ipcMain, window, fs);
});
// destroy bindings on popup window closed
contents.on("destroyed", () => {
i18nextBackend.clearMainBindings(ipcMain);
});

// https://electronjs.org/docs/tutorial/security#13-disable-or-limit-creation-of-new-windows
// This code replaces the old "new-window" event handling;
// https://github.com/electron/electron/pull/24517#issue-447670981
Expand Down

0 comments on commit 6af1020

Please sign in to comment.