From 673eaf2695fd74c2afe8c6c5fc65539a05f575b4 Mon Sep 17 00:00:00 2001 From: Curtis Carter Date: Thu, 12 Jun 2025 12:56:08 -0500 Subject: [PATCH] Fix #142 Relative Path resolution in LoadTranslations --- src/util/file-system.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/file-system.ts b/src/util/file-system.ts index 3256963..be33dff 100644 --- a/src/util/file-system.ts +++ b/src/util/file-system.ts @@ -48,7 +48,7 @@ export const loadTranslations = ( fileType: FileType = 'auto', withArrays = false, ) => - globSync(`${directory}/*.json`, { ignore: exclude }).map((f) => { + globSync(`${directory}/*.json`, { ignore: exclude, cwd: directory }).map((f) => { const json = require(path.resolve(directory, f)); const type = fileType === 'auto' ? detectFileType(json) : fileType;