diff --git a/editor/src/app/app.module.ts b/editor/src/app/app.module.ts index 480dd072b..65eb7929e 100644 --- a/editor/src/app/app.module.ts +++ b/editor/src/app/app.module.ts @@ -124,9 +124,16 @@ import { LibraryPageComponent } from './components/library-page/library-page.com import { KNOWN_LANGUAGES } from './models'; import { DecisionTreeComponent } from './components/decision-tree/decision-tree.component'; import { ServiceWorkerModule } from '@angular/service-worker'; +import { timeout } from 'rxjs/operators'; + +class CustomTranslateLoader extends TranslateHttpLoader { + getTranslation(lang: string) { + return super.getTranslation(lang).pipe(timeout(3000)); + } +} export function HttpLoaderFactory(http: HttpClient) { - return new TranslateHttpLoader(http); + return new CustomTranslateLoader(http); } export function loadTranslations(