File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ const selfHost = `http://localhost:${port}`;
2929// be closed automatically when the JavaScript object is garbage collected.
3030let win ;
3131let menuBuilder ;
32- let i18nInitialized = false ;
3332
3433async function createWindow ( ) {
3534
@@ -171,9 +170,7 @@ async function createWindow() {
171170
172171 // Set up necessary bindings to update the menu items
173172 // based on the current language selected
174- i18nextMainBackend . on ( "initialized" , ( loaded ) => {
175- i18nInitialized = true ;
176-
173+ i18nextMainBackend . on ( "initialized" , ( loaded ) => {
177174 i18nextMainBackend . changeLanguage ( "en" ) ;
178175 i18nextMainBackend . off ( "initialized" ) ; // Remove listener to this event as it's not needed anymore
179176 } ) ;
@@ -185,7 +182,7 @@ async function createWindow() {
185182 // below code until AFTER the i18n framework has finished its
186183 // "initialized" event.
187184 i18nextMainBackend . on ( "languageChanged" , ( lng ) => {
188- if ( i18nInitialized ) {
185+ if ( i18nextMainBackend . isInitialized ) {
189186 menuBuilder . buildMenu ( i18nextMainBackend ) ;
190187 }
191188 } ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " secure-electron-template" ,
3- "version" : " 16.0.1 " ,
3+ "version" : " 16.0.2 " ,
44 "description" : " The best way to build Electron apps with security in mind." ,
55 "private" : true ,
66 "main" : " app/electron/main.js" ,
You can’t perform that action at this time.
0 commit comments