diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-03-13 16:13:54 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-03-13 16:58:08 +0100 |
| commit | ef9c1bf34183d2c3ad028ffcb364081a936cc7f9 (patch) | |
| tree | 370d6ae9590074acf076b1baa487703c86cdbfcd /desktop | |
| parent | b5f47cac4eea24ed3b71014f9883aa74862ef3d5 (diff) | |
| download | mullvadvpn-ef9c1bf34183d2c3ad028ffcb364081a936cc7f9.tar.xz mullvadvpn-ef9c1bf34183d2c3ad028ffcb364081a936cc7f9.zip | |
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.
Diffstat (limited to 'desktop')
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/main/load-translations.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/packages/mullvad-vpn/src/main/load-translations.ts b/desktop/packages/mullvad-vpn/src/main/load-translations.ts index 137d34bcec..b4df4f52e7 100644 --- a/desktop/packages/mullvad-vpn/src/main/load-translations.ts +++ b/desktop/packages/mullvad-vpn/src/main/load-translations.ts @@ -6,7 +6,8 @@ import path from 'path'; import log from '../shared/logging'; const SOURCE_LANGUAGE = 'en'; -const LOCALES_DIR = path.resolve(__dirname, '../locales'); +const PATH_PREFIX = process.env.NODE_ENV === 'development' ? '../' : ''; +const LOCALES_DIR = path.resolve(__dirname, `${PATH_PREFIX}locales`); export function loadTranslations( currentLocale: string, |
