From 6bdfafe6453b001a1fa552eb965c1daa8cd00662 Mon Sep 17 00:00:00 2001 From: Andreas Mahnke Date: Thu, 7 Dec 2023 16:07:01 +0100 Subject: [PATCH] Bugfix --- src/ngx-translate-loaders/translate-server.loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngx-translate-loaders/translate-server.loader.ts b/src/ngx-translate-loaders/translate-server.loader.ts index fcbd7aa800e..8775af0fe31 100644 --- a/src/ngx-translate-loaders/translate-server.loader.ts +++ b/src/ngx-translate-loaders/translate-server.loader.ts @@ -25,7 +25,7 @@ export class TranslateServerLoader implements TranslateLoader { */ public getTranslation(lang: string): Observable { const languageHashesConfigFromEnvironment = environment.languageHashes.filter((languageHashConfig) => languageHashConfig.lang === lang); - const translationHash = `.${languageHashesConfigFromEnvironment.length > 0 ? languageHashesConfigFromEnvironment[0].md5 : (process.env.languageHashes as any)[lang + '.json5']}`; + const translationHash = languageHashesConfigFromEnvironment.length > 0 ? languageHashesConfigFromEnvironment[0].md5 : (process.env.languageHashes as any)[lang + '.json5']; // Retrieve the file for the given language, and parse it const messages = JSON.parse(readFileSync(`${this.prefix}${lang}.${translationHash}${this.suffix}`, 'utf8'));