[ACS-5629] enhanced way of providing translations (#8763)

* enhanced way providing translations

* update documentation

* update documentation

* test fixes

* try add missing module import

* inject i18n to core module to cause the setup
This commit is contained in:
Denys Vuika
2023-07-18 20:06:09 +01:00
committed by GitHub
parent d70f689e06
commit 1a4d7ba008
11 changed files with 99 additions and 183 deletions

View File

@@ -18,7 +18,7 @@
import { CommonModule } from '@angular/common';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CoreModule, TRANSLATION_PROVIDER } from '@alfresco/adf-core';
import { CoreModule, provideTranslations } from '@alfresco/adf-core';
import { DiagramsModule } from './diagram/diagram.module';
import { AnalyticsProcessModule } from './analytics-process/analytics-process.module';
@@ -45,14 +45,7 @@ export class InsightsModule {
return {
ngModule: InsightsModule,
providers: [
{
provide: TRANSLATION_PROVIDER,
multi: true,
useValue: {
name: 'adf-insights',
source: 'assets/adf-insights'
}
}
provideTranslations('adf-insights', 'assets/adf-insights')
]
};
}