@@ -11,6 +11,7 @@ import {translate} from '@libs/Localize';
1111import Log from '@libs/Log' ;
1212import CONFIG from '@src/CONFIG' ;
1313import CONST from '@src/CONST' ;
14+ import TranslationStore from '@src/languages/TranslationStore' ;
1415import type { TranslationPaths } from '@src/languages/types' ;
1516import type PlatformSpecificUpdater from '@src/setup/platformSetup/types' ;
1617import type { Locale } from '@src/types/onyx' ;
@@ -665,10 +666,12 @@ const mainWindow = (): Promise<void> => {
665666 // because the only way code can be shared between the main and renderer processes at runtime is via the context bridge
666667 // So we track preferredLocale separately via ELECTRON_EVENTS.LOCALE_UPDATED
667668 ipcMain . on ( ELECTRON_EVENTS . LOCALE_UPDATED , ( event , updatedLocale : Locale ) => {
668- preferredLocale = updatedLocale ;
669- Menu . setApplicationMenu ( Menu . buildFromTemplate ( localizeMenuItems ( initialMenuTemplate , updatedLocale ) ) ) ;
670- disposeContextMenu ?.( ) ;
671- disposeContextMenu = createContextMenu ( updatedLocale ) ;
669+ TranslationStore . load ( updatedLocale ) . then ( ( ) => {
670+ preferredLocale = updatedLocale ;
671+ Menu . setApplicationMenu ( Menu . buildFromTemplate ( localizeMenuItems ( initialMenuTemplate , updatedLocale ) ) ) ;
672+ disposeContextMenu ?.( ) ;
673+ disposeContextMenu = createContextMenu ( updatedLocale ) ;
674+ } ) ;
672675 } ) ;
673676
674677 ipcMain . on ( ELECTRON_EVENTS . REQUEST_VISIBILITY , ( event ) => {
0 commit comments