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 @@

Administrar Software

+ text="Administra el software deisponible desde este componente.">{{ 'manageSoftware' | translate }}
+ - - - diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 28a75e6..89c7525 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -424,6 +424,7 @@ "calendars": "Calendars", "TOOLTIP_CALENDARS": "Manage remotePC calendars", "software": "Software", + "manageSoftware": "Manage Software", "TOOLTIP_SOFTWARE": "Manage software configurations", "softwareList": "List", "TOOLTIP_SOFTWARE_LIST": "View list of available software", diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index ed397d9..dcf7ee5 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -425,6 +425,7 @@ "calendars": "Calendarios", "TOOLTIP_CALENDARS": "Gestionar calendarios de remotePC", "software": "Software", + "manageSoftware": "Administrar Software", "TOOLTIP_SOFTWARE": "Administrar configuraciones de software", "softwareList": "Listado", "TOOLTIP_SOFTWARE_LIST": "Ver lista de software disponible", diff --git a/ogWebconsole/src/main.ts b/ogWebconsole/src/main.ts index be6bfab..fbf76ea 100644 --- a/ogWebconsole/src/main.ts +++ b/ogWebconsole/src/main.ts @@ -1,9 +1,5 @@ -/// - import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - import { AppModule } from './app/app.module'; - platformBrowserDynamic().bootstrapModule(AppModule) .catch(err => console.error(err)); diff --git a/ogWebconsole/tsconfig.app.json b/ogWebconsole/tsconfig.app.json index ec26f70..374cc9d 100644 --- a/ogWebconsole/tsconfig.app.json +++ b/ogWebconsole/tsconfig.app.json @@ -3,9 +3,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", - "types": [ - "@angular/localize" - ] + "types": [] }, "files": [ "src/main.ts"