Skip to content

Commit

Permalink
fix macos translation loading
Browse files Browse the repository at this point in the history
i hate this lol
  • Loading branch information
JovannMC committed Nov 16, 2024
1 parent 8ebb174 commit 28e3800
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28e3800

Please sign in to comment.