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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ export class AppLocalization {
public fetchTranslationJson(locale: string): Record<string, string> { public fetchTranslationJson(locale: string): Record<string, string> {
try { try {
console.log("Fetching translation json for locale: " + locale); 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) { } catch (e) {
console.log(`Could not fetch translation json for locale: '${locale}'`, e); console.log(`Could not fetch translation json for locale: '${locale}'`, e);
return {}; return {};