Skip to content

Commit ef9c1bf

Browse files
tobias-jarvelovMarkusPettersson98
authored andcommitted
Ensure locales are loaded from the correct path
Due to the vite migration the path to load resources from is different between the production and development environments.
1 parent b5f47ca commit ef9c1bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

desktop/packages/mullvad-vpn/src/main/load-translations.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import path from 'path';
66
import log from '../shared/logging';
77

88
const SOURCE_LANGUAGE = 'en';
9-
const LOCALES_DIR = path.resolve(__dirname, '../locales');
9+
const PATH_PREFIX = process.env.NODE_ENV === 'development' ? '../' : '';
10+
const LOCALES_DIR = path.resolve(__dirname, `${PATH_PREFIX}locales`);
1011

1112
export function loadTranslations(
1213
currentLocale: string,

0 commit comments

Comments
 (0)