Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/18/head
Manuel Aranda Rosales 2025-03-13 14:47:29 +01:00
commit 82eea78c30
8 changed files with 22 additions and 36 deletions

View File

@ -24,7 +24,7 @@
"builder": "@ngx-env/builder:application", "builder": "@ngx-env/builder:application",
"options": { "options": {
"baseHref": "/oggui/", "baseHref": "/oggui/",
"localize": true, "localize": false,
"aot": true, "aot": true,
"outputPath": "dist/og-webconsole", "outputPath": "dist/og-webconsole",
"index": "src/index.html", "index": "src/index.html",
@ -73,16 +73,6 @@
"optimization": false, "optimization": false,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": false "sourceMap": false
},
"es": {
"localize": [
"es-ES"
]
},
"en": {
"localize": [
"en-US"
]
} }
}, },
"defaultConfiguration": "production" "defaultConfiguration": "production"
@ -101,12 +91,6 @@
}, },
"development": { "development": {
"buildTarget": "ogWebconsole:build:development" "buildTarget": "ogWebconsole:build:development"
},
"es": {
"buildTarget": "ogWebconsole:build:es"
},
"en": {
"buildTarget": "ogWebconsole:build:en"
} }
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"
@ -116,8 +100,7 @@
"options": { "options": {
"polyfills": [ "polyfills": [
"zone.js", "zone.js",
"zone.js/testing", "zone.js/testing"
"@angular/localize/init"
], ],
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"assets": [ "assets": [

View File

@ -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 { ConfigService } from './services/config.service';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module'; 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 { OperationResultDialogComponent } from './components/ogdhcp/operation-result-dialog/operation-result-dialog.component';
import { ManageClientComponent } from './components/groups/shared/clients/manage-client/manage-client.component'; import { ManageClientComponent } from './components/groups/shared/clients/manage-client/manage-client.component';
import { ConvertImageComponent } from './components/repositories/convert-image/convert-image.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) { export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http, './locale/', '.json'); return new TranslateHttpLoader(http, './locale/', '.json');
} }
@ -139,6 +142,8 @@ export function initializeApp(configService: ConfigService) {
return () => configService.loadConfig(); return () => configService.loadConfig();
} }
registerLocaleData(localeEs, 'es-ES');
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
@ -280,6 +285,7 @@ export function initializeApp(configService: ConfigService) {
useClass: CustomInterceptor, useClass: CustomInterceptor,
multi: true multi: true
}, },
{ provide: LOCALE_ID, useValue: 'es-ES' },
provideAnimationsAsync(), provideAnimationsAsync(),
provideHttpClient(withInterceptorsFromDi()), provideHttpClient(withInterceptorsFromDi()),
ConfigService, ConfigService,

View File

@ -4,7 +4,7 @@
</button> </button>
<div class="header-container-title"> <div class="header-container-title">
<h2 i18n="@@adminImagesTitle" joyrideStep="titleStep" <h2 i18n="@@adminImagesTitle" joyrideStep="titleStep"
text="Administra el software deisponible desde este componente.">Administrar Software</h2> text="Administra el software deisponible desde este componente.">{{ 'manageSoftware' | translate }}</h2>
</div> </div>
<div class="calendar-button-row"> <div class="calendar-button-row">
<button class="action-button" (click)="addSoftware()" joyrideStep="addSoftwareStep" <button class="action-button" (click)="addSoftware()" joyrideStep="addSoftwareStep"

View File

@ -9,35 +9,36 @@
</button> </button>
<div class="navbar-actions-row"> <div class="navbar-actions-row">
<button class="trace-button" routerLink="/commands-logs" mat-button><mat-icon>notifications</mat-icon></button> <button class="trace-button" routerLink="/commands-logs" mat-button
i18n="@@admin"><mat-icon>notifications</mat-icon></button>
<div class="navbar-buttons-row"> <div class="navbar-buttons-row">
<button class="ordinary-button" *ngIf="isSuperAdmin" [matMenuTriggerFor]="menu" <button class="ordinary-button" *ngIf="isSuperAdmin" [matMenuTriggerFor]="menu" i18n="@@admin"
matTooltip="Gestión de usuarios y roles de la aplicación" matTooltipShowDelay="1000"> matTooltip="Gestión de usuarios y roles de la aplicación" matTooltipShowDelay="1000">
{{ 'Administration' | translate }} {{ 'Administration' | translate }}
</button> </button>
<button class="ordinary-button" *ngIf="!isSuperAdmin" (click)="editUser()" <button class="ordinary-button" *ngIf="!isSuperAdmin" (click)="editUser()" i18n="@@editUser"
matTooltip="Editar tu información de usuario" matTooltipShowDelay="1000"> matTooltip="Editar tu información de usuario" matTooltipShowDelay="1000">
{{ 'changePassword' | translate }} {{ 'changePassword' | translate }}
</button> </button>
<button class="logout-button" routerLink="/auth/login" matTooltip="Cerrar sesión y salir de la aplicación" <button class="logout-button" routerLink="/auth/login" i18n="@@logout"
matTooltipShowDelay="1000"> matTooltip="Cerrar sesión y salir de la aplicación" matTooltipShowDelay="1000">
{{ 'logout' | translate }} {{ 'logout' | translate }}
</button> </button>
</div> </div>
<mat-menu #menu="matMenu"> <mat-menu #menu="matMenu">
<button mat-menu-item routerLink="/users" matTooltip="Ver y gestionar todos los usuarios" <button mat-menu-item routerLink="/users" i18n="@@usersMenuItem" matTooltip="Ver y gestionar todos los usuarios"
matTooltipShowDelay="1000"> matTooltipShowDelay="1000">
{{ 'labelUsers' | translate }} {{ 'labelUsers' | translate }}
</button> </button>
<button mat-menu-item routerLink="/user-groups" matTooltip="Gestionar roles de usuario" <button mat-menu-item routerLink="/user-groups" i18n="@@rolesMenuItem" matTooltip="Gestionar roles de usuario"
matTooltipShowDelay="1000"> matTooltipShowDelay="1000">
{{ 'labelRoles' | translate }} {{ 'labelRoles' | translate }}
</button> </button>
<button mat-menu-item routerLink="/env-vars" matTooltip="Gestionar variables de entorno" <button mat-menu-item routerLink="/env-vars" i18n="@@rolesMenuItem" matTooltip="Gestionar variables de entorno"
matTooltipShowDelay="1000"> matTooltipShowDelay="1000">
{{ 'labelEnvVars' | translate }} {{ 'labelEnvVars' | translate }}
</button> </button>

View File

@ -424,6 +424,7 @@
"calendars": "Calendars", "calendars": "Calendars",
"TOOLTIP_CALENDARS": "Manage remotePC calendars", "TOOLTIP_CALENDARS": "Manage remotePC calendars",
"software": "Software", "software": "Software",
"manageSoftware": "Manage Software",
"TOOLTIP_SOFTWARE": "Manage software configurations", "TOOLTIP_SOFTWARE": "Manage software configurations",
"softwareList": "List", "softwareList": "List",
"TOOLTIP_SOFTWARE_LIST": "View list of available software", "TOOLTIP_SOFTWARE_LIST": "View list of available software",

View File

@ -425,6 +425,7 @@
"calendars": "Calendarios", "calendars": "Calendarios",
"TOOLTIP_CALENDARS": "Gestionar calendarios de remotePC", "TOOLTIP_CALENDARS": "Gestionar calendarios de remotePC",
"software": "Software", "software": "Software",
"manageSoftware": "Administrar Software",
"TOOLTIP_SOFTWARE": "Administrar configuraciones de software", "TOOLTIP_SOFTWARE": "Administrar configuraciones de software",
"softwareList": "Listado", "softwareList": "Listado",
"TOOLTIP_SOFTWARE_LIST": "Ver lista de software disponible", "TOOLTIP_SOFTWARE_LIST": "Ver lista de software disponible",

View File

@ -1,9 +1,5 @@
/// <reference types="@angular/localize" />
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module'; import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule) platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err)); .catch(err => console.error(err));

View File

@ -3,9 +3,7 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out-tsc/app", "outDir": "./out-tsc/app",
"types": [ "types": []
"@angular/localize"
]
}, },
"files": [ "files": [
"src/main.ts" "src/main.ts"