mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Merge remote-tracking branch 'origin/main' into more-eslint
This commit is contained in:
@@ -30,8 +30,9 @@ export class TranslateServerLoader implements TranslateLoader {
|
||||
* @param lang the language code
|
||||
*/
|
||||
public getTranslation(lang: string): Observable<any> {
|
||||
const translationHash: string = (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}${this.suffix}`, 'utf8'));
|
||||
const messages = JSON.parse(readFileSync(`${this.prefix}${lang}.${translationHash}${this.suffix}`, 'utf8'));
|
||||
// Store the parsed messages in the transfer state so they'll be available immediately when the
|
||||
// app loads on the client
|
||||
this.storeInTransferState(lang, messages);
|
||||
|
Reference in New Issue
Block a user