Fix i18n json file paths (#1527)

This commit is contained in:
Michael Telatynski
2024-02-20 11:36:49 +00:00
committed by GitHub
parent 4851a32e23
commit 1366a553b2

View File

@@ -106,7 +106,7 @@ export class AppLocalization {
public fetchTranslationJson(locale: string): Record<string, string> {
try {
console.log("Fetching translation json for locale: " + locale);
return loadJsonFile(`./i18n/strings/${this.denormalize(locale)}.json`);
return loadJsonFile(__dirname, "i18n", "strings", `${this.denormalize(locale)}.json`);
} catch (e) {
console.log(`Could not fetch translation json for locale: '${locale}'`, e);
return {};