Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Mahnke committed Dec 7, 2023
1 parent 2a44f13 commit 6bdfafe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ngx-translate-loaders/translate-server.loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class TranslateServerLoader implements TranslateLoader {
*/
public getTranslation(lang: string): Observable<any> {
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'));
Expand Down

0 comments on commit 6bdfafe

Please sign in to comment.