mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
Add lint rule banning wildcard imports. Fix existing ones where possible.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { TranslateLoader } from '@ngx-translate/core';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import * as fs from 'fs';
|
||||
import { readFileSync } from 'fs';
|
||||
import { TransferState } from '@angular/platform-browser';
|
||||
import { NGX_TRANSLATE_STATE, NgxTranslateState } from './ngx-translate-state';
|
||||
|
||||
@@ -24,7 +24,7 @@ export class TranslateServerLoader implements TranslateLoader {
|
||||
*/
|
||||
public getTranslation(lang: string): Observable<any> {
|
||||
// Retrieve the file for the given language, and parse it
|
||||
const messages = JSON.parse(fs.readFileSync(`${this.prefix}${lang}${this.suffix}`, 'utf8'));
|
||||
const messages = JSON.parse(readFileSync(`${this.prefix}${lang}${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