From c81d00e75f751fa4ad438d7d7d4031265b153b1a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 11:04:45 +0000 Subject: [PATCH] Ensure i18n is initialized before setting about panel options Co-authored-by: mifi <402547+mifi@users.noreply.github.com> --- src/main/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 91f88457..203baaec 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -32,7 +32,7 @@ import isStoreBuild from './isStoreBuild.js'; import { getAboutPanelOptions } from './aboutPanel.js'; import { checkNewVersion } from './updateChecker.js'; import * as i18nCommon from './i18nCommon.js'; -import './i18n.js'; +import i18nInit from './i18n.js'; import type { ApiActionRequest } from '../common/types.js'; import * as ffmpeg from './ffmpeg.js'; import * as compatPlayer from './compatPlayer.js'; @@ -58,9 +58,6 @@ if (isWindows) { app.setAppUserModelId(app.name); } -// https://www.electronjs.org/docs/latest/api/app#appsetaboutpaneloptionsoptions -app.setAboutPanelOptions(getAboutPanelOptions()); - let filesToOpen: string[] = []; // Keep a global reference of the window object, if you don't, the window will @@ -246,6 +243,9 @@ const readyPromise = app.whenReady(); async function init() { try { logger.info('LosslessCut version', app.getVersion(), { isDev }); + await i18nInit; + // https://www.electronjs.org/docs/latest/api/app#appsetaboutpaneloptionsoptions + app.setAboutPanelOptions(getAboutPanelOptions()); await configStore.init({ customConfigDir: argv['configDir'] }); logger.info('Initialized config store');