mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
fixed aot build with translate loader (wip)
This commit is contained in:
@@ -4,11 +4,11 @@ import * as fs from 'fs';
|
||||
|
||||
export class TranslateUniversalLoader implements TranslateLoader {
|
||||
|
||||
constructor(private prefix: string = 'i18n', private suffix: string = '.json') { }
|
||||
constructor(private prefix: string = 'dist/assets/i18n/', private suffix: string = '.json') { }
|
||||
|
||||
public getTranslation(lang: string): Observable<any> {
|
||||
return Observable.create((observer: any) => {
|
||||
observer.next(JSON.parse(fs.readFileSync(`${this.prefix}/${lang}${this.suffix}`, 'utf8')));
|
||||
observer.next(JSON.parse(fs.readFileSync(`${this.prefix}${lang}${this.suffix}`, 'utf8')));
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user