Commit 72e0e4c2 authored by naji's avatar naji
Browse files

fix: build gateway prod mode

parent 51fd56f3
......@@ -35,16 +35,16 @@
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import { registerLocaleData } from '@angular/common';
import { HttpBackend, HttpClient } from '@angular/common/http';
import { HttpClient } from '@angular/common/http';
import { default as localeFr } from '@angular/common/locales/fr';
import { APP_INITIALIZER, LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule, Title } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ServiceWorkerModule } from '@angular/service-worker';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { MissingTranslationHandler, TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { QuicklinkModule } from 'ngx-quicklink';
// import { VitamUILibraryModule } from 'projects/vitamui-library/src/public-api';
import { VitamUICommonModule, WINDOW_LOCATION } from 'ui-frontend-common';
import { VitamUICommonModule, VitamuiMissingTranslationHandler, WINDOW_LOCATION } from 'ui-frontend-common';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
......@@ -52,25 +52,20 @@ import { AppComponent } from './app.component';
import { MatToolbarModule } from '@angular/material/toolbar';
import { PastisConfiguration } from './core/classes/pastis-configuration';
import { RegisterIconsService } from './core/services/register-icons.service';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { ToastrModule } from 'ngx-toastr';
import { InjectorModule } from 'ui-frontend-common';
import { LoggerModule } from 'ui-frontend-common';
import { BASE_URL } from 'ui-frontend-common';
import { ENVIRONMENT } from 'ui-frontend-common';
import { SedaVisualizerService } from './seda-visualizer.service';
import { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';
/* export function httpLoaderFactory(httpClient: HttpClient): MultiTranslateHttpLoader {
export function httpLoaderFactory(httpClient: HttpClient): MultiTranslateHttpLoader {
return new MultiTranslateHttpLoader(httpClient, [
{ prefix: './assets/shared-i18n/', suffix: '.json' },
{ prefix: './assets/i18n/', suffix: '.json' },
]);
} */
export function translateHttpLoaderFactory(httpBackend: HttpBackend): TranslateHttpLoader {
return new TranslateHttpLoader(new HttpClient(httpBackend), '../assets/i18n/', '.json');
}
registerLocaleData(localeFr, 'fr');
@NgModule({
......@@ -87,7 +82,7 @@ registerLocaleData(localeFr, 'fr');
MatToolbarModule,
// VitamUILibraryModule,
QuicklinkModule,
/* TranslateModule.forRoot({
TranslateModule.forRoot({
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: VitamuiMissingTranslationHandler },
defaultLanguage: 'fr',
loader: {
......@@ -95,17 +90,6 @@ registerLocaleData(localeFr, 'fr');
useFactory: httpLoaderFactory,
deps: [HttpClient],
},
}), */
TranslateModule.forRoot({
defaultLanguage: 'fr',
loader: {
provide: TranslateLoader,
/* useFactory: httpLoaderFactory,
deps: [HttpClient]*/
deps: [HttpBackend],
useFactory: translateHttpLoaderFactory
}
}),
ToastrModule.forRoot({
positionClass: 'toast-bottom-full-width',
......
......@@ -15,7 +15,7 @@
</parent>
<properties>
<angular.base.href>/</angular.base.href>
<angular.base.href>/pastis/</angular.base.href>
<angular.build.project>pastis</angular.build.project>
<rpm.skip>false</rpm.skip>
<sonar.sources>src/main/java</sonar.sources>
......
......@@ -16,6 +16,7 @@ ui-pastis:
portal-logo: logo_PORTAL.png
header-logo: logo_HEADER.png
footer-logo: logo_FOOTER.png
user-logo: logo_USER.png
portal-message: "Profitez d'un portail unique pour rechercher dans les archives de vos coffres, pour déposer des éléments en toutes sécurité et pour imprimer des etiquettes en quelques clics."
portal-title: "Portail des applications de l'archivage"
theme-colors:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment