From 28e3800caaacc969204b308147e2e67fa7e93c47 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Sat, 16 Nov 2024 20:11:58 +0300 Subject: [PATCH] fix macos translation loading i hate this lol --- src/main.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 3068e69..6512989 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,9 +15,14 @@ const __dirname = dirname(__filename); const mainPath = app.isPackaged ? path.dirname(app.getPath("exe")) : __dirname; const configPath = path.resolve(mainPath, "config.json"); +const isMac = process.platform === "darwin"; // don't mess with this or languages will fail to load cause of how the project is structured, lol -const languagesPath = path.resolve(mainPath, app.isPackaged ? "resources/languages" : "languages"); - +// i hate how this is done. +const languagesPath = path.resolve( + mainPath, + isMac ? ".." : "", + app.isPackaged ? (isMac ? "Resources/languages" : "resources/languages") : "languages" +); let mainWindow: BrowserWindow; let trackerSettingsWindow: BrowserWindow; let onboardingWindow: BrowserWindow;