Skip to content

Commit

Permalink
feat: don't download i18n in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Sep 11, 2023
1 parent cc342ea commit 2d0927c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/crowdin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { app } from "electron";
import { i18n } from "../managers/i18n";

import otaClient, { Translations } from "@crowdin/ota-client";
Expand All @@ -15,6 +16,13 @@ import * as log from "electron-log";
* @description Downloads all translations from Crowdin. Use at app start.
*/
export async function init() {
if (!app.isPackaged) {
return log.warn(
"[Crowdin]",
"Not downloading translations in dev mode"
);
}

log.info("[Crowdin]", "Initializing Crowdin OTA Client");

const client = new otaClient("4e8945ce96a5a9adcee3308fjap");
Expand Down

0 comments on commit 2d0927c

Please sign in to comment.