diff --git a/ogWebconsole/angular.json b/ogWebconsole/angular.json index 89318eb..b6f4ae3 100644 --- a/ogWebconsole/angular.json +++ b/ogWebconsole/angular.json @@ -24,7 +24,7 @@ "builder": "@ngx-env/builder:application", "options": { "baseHref": "/oggui/", - "localize": true, + "localize": false, "aot": true, "outputPath": "dist/og-webconsole", "index": "src/index.html", @@ -73,16 +73,6 @@ "optimization": false, "extractLicenses": false, "sourceMap": false - }, - "es": { - "localize": [ - "es-ES" - ] - }, - "en": { - "localize": [ - "en-US" - ] } }, "defaultConfiguration": "production" @@ -101,12 +91,6 @@ }, "development": { "buildTarget": "ogWebconsole:build:development" - }, - "es": { - "buildTarget": "ogWebconsole:build:es" - }, - "en": { - "buildTarget": "ogWebconsole:build:en" } }, "defaultConfiguration": "development" @@ -116,8 +100,7 @@ "options": { "polyfills": [ "zone.js", - "zone.js/testing", - "@angular/localize/init" + "zone.js/testing" ], "tsConfig": "tsconfig.spec.json", "assets": [ diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts index 2007b14..dcdd97f 100644 --- a/ogWebconsole/src/app/app.module.ts +++ b/ogWebconsole/src/app/app.module.ts @@ -1,4 +1,4 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA, APP_INITIALIZER } from '@angular/core'; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA, LOCALE_ID, APP_INITIALIZER } from '@angular/core'; import { ConfigService } from './services/config.service'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; @@ -131,6 +131,9 @@ import { ShowClientsComponent } from './components/ogdhcp/show-clients/show-clie import { OperationResultDialogComponent } from './components/ogdhcp/operation-result-dialog/operation-result-dialog.component'; import { ManageClientComponent } from './components/groups/shared/clients/manage-client/manage-client.component'; import { ConvertImageComponent } from './components/repositories/convert-image/convert-image.component'; +import { registerLocaleData } from '@angular/common'; +import localeEs from '@angular/common/locales/es'; + export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, './locale/', '.json'); } @@ -139,6 +142,8 @@ export function initializeApp(configService: ConfigService) { return () => configService.loadConfig(); } +registerLocaleData(localeEs, 'es-ES'); + @NgModule({ declarations: [ AppComponent, @@ -280,6 +285,7 @@ export function initializeApp(configService: ConfigService) { useClass: CustomInterceptor, multi: true }, + { provide: LOCALE_ID, useValue: 'es-ES' }, provideAnimationsAsync(), provideHttpClient(withInterceptorsFromDi()), ConfigService, diff --git a/ogWebconsole/src/app/components/software/software.component.html b/ogWebconsole/src/app/components/software/software.component.html index 8ee4f5e..24b4f26 100644 --- a/ogWebconsole/src/app/components/software/software.component.html +++ b/ogWebconsole/src/app/components/software/software.component.html @@ -4,7 +4,7 @@