diff options
Diffstat (limited to 'packages/main/src/infrastructure/resources/impl/getDistResources.ts')
-rw-r--r-- | packages/main/src/infrastructure/resources/impl/getDistResources.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/main/src/infrastructure/resources/impl/getDistResources.ts b/packages/main/src/infrastructure/resources/impl/getDistResources.ts index f3c3f7b..3b7827c 100644 --- a/packages/main/src/infrastructure/resources/impl/getDistResources.ts +++ b/packages/main/src/infrastructure/resources/impl/getDistResources.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import path from 'node:path'; | 21 | import path from 'node:path'; |
22 | import { pathToFileURL, URL } from 'node:url'; | 22 | import { pathToFileURL, URL } from 'node:url'; |
23 | 23 | ||
24 | import Resources from '../Resources'; | 24 | import Resources from '../Resources.js'; |
25 | 25 | ||
26 | export default function getDistResources( | 26 | export default function getDistResources( |
27 | devMode: boolean, | 27 | devMode: boolean, |
@@ -33,6 +33,7 @@ export default function getDistResources( | |||
33 | devServerURL = import.meta.env?.VITE_DEV_SERVER_URL, | 33 | devServerURL = import.meta.env?.VITE_DEV_SERVER_URL, |
34 | ): Resources { | 34 | ): Resources { |
35 | const packagesRoot = path.join(thisDir, '..', '..'); | 35 | const packagesRoot = path.join(thisDir, '..', '..'); |
36 | const localizationRoot = path.join(packagesRoot, '..', 'locales'); | ||
36 | 37 | ||
37 | function getPath(packageName: string, relativePathInPackage: string): string { | 38 | function getPath(packageName: string, relativePathInPackage: string): string { |
38 | return path.join(packagesRoot, packageName, 'dist', relativePathInPackage); | 39 | return path.join(packagesRoot, packageName, 'dist', relativePathInPackage); |
@@ -48,6 +49,9 @@ export default function getDistResources( | |||
48 | 49 | ||
49 | return { | 50 | return { |
50 | getPath, | 51 | getPath, |
52 | getLocalizationPath(language, fileName) { | ||
53 | return path.join(localizationRoot, language, fileName); | ||
54 | }, | ||
51 | getFileURL, | 55 | getFileURL, |
52 | getRendererURL: | 56 | getRendererURL: |
53 | devMode && devServerURL !== undefined | 57 | devMode && devServerURL !== undefined |