From 58a0639cb5e7c71bf64995f862098e3caaa91595 Mon Sep 17 00:00:00 2001 From: apuente Date: Tue, 19 Nov 2024 13:35:46 +0100 Subject: [PATCH] refs #1138 Fix translations --- ogWebconsole/src/app/app.component.ts | 7 +++- .../main-commands/commands.component.html | 2 +- .../components/images/images.component.html | 2 +- .../app/components/images/images.component.ts | 2 +- ogWebconsole/src/locale/en.json | 37 +++++++++++++++++- ogWebconsole/src/locale/es.json | 38 ++++++++++++++++++- 6 files changed, 82 insertions(+), 6 deletions(-) diff --git a/ogWebconsole/src/app/app.component.ts b/ogWebconsole/src/app/app.component.ts index 442f02e..d681b66 100644 --- a/ogWebconsole/src/app/app.component.ts +++ b/ogWebconsole/src/app/app.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-root', @@ -7,7 +8,11 @@ import { Component } from '@angular/core'; }) export class AppComponent { title = 'ogWebconsole'; + constructor(private translateService: TranslateService) { + const savedLanguage = localStorage.getItem('language') || 'es'; + this.translateService.use(savedLanguage); + } ngOnInit() { - localStorage.setItem('language', 'es'); + sessionStorage.setItem('language', 'es'); } } diff --git a/ogWebconsole/src/app/components/commands/main-commands/commands.component.html b/ogWebconsole/src/app/components/commands/main-commands/commands.component.html index 44af237..d529f48 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/commands.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/commands.component.html @@ -2,7 +2,7 @@ -

{{ 'adminCommandsTitle' | translate }}

+

{{ 'CommandsTitle' | translate }}

diff --git a/ogWebconsole/src/app/components/images/images.component.html b/ogWebconsole/src/app/components/images/images.component.html index fffbcd7..9ad6c84 100644 --- a/ogWebconsole/src/app/components/images/images.component.html +++ b/ogWebconsole/src/app/components/images/images.component.html @@ -13,7 +13,7 @@
- + Buscar nombre de imagen search diff --git a/ogWebconsole/src/app/components/images/images.component.ts b/ogWebconsole/src/app/components/images/images.component.ts index 6c41a62..2be31f7 100644 --- a/ogWebconsole/src/app/components/images/images.component.ts +++ b/ogWebconsole/src/app/components/images/images.component.ts @@ -185,7 +185,7 @@ export class ImagesComponent implements OnInit { steps: [ 'imagesTitleStep', 'addImageButton', - 'searchImageField', + 'searchImagesField', 'imagesTable', 'actionsHeader', 'editImageButton', diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index a5e5a9c..821ac6b 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -340,5 +340,40 @@ "addClientButton": "Add client", "searchClientNameLabel": "Search client name", "searchIPLabel": "Search IP", - "searchMACLabel": "Search MAC" + "searchMACLabel": "Search MAC", + "diskUsageTitle": "Disk Usage", + "ogBootServerStatus": "OgBoot Server Status", + "servicesTitle": "Services", + "Legend": "Legend", + "totalLabel": "Total", + "usedLabel": "Used", + "freeLabel": "Free", + "availableLabel": "Available", + "InstalledOglivesTitle": "Installed OgLives", + "idLabel": "ID", + "KernelLabel": "Kernel", + "architectureLabel": "Architecture", + "revisionLabel": "Revision", + "serverInfoTitle": "Server Information", + "adminPxeTitle": "Manage PXE Files", + "createdOgBootLabel": "Created in OgBoot", + "selectOptionPlaceholder": "Select an option", + "yesOption": "Yes", + "noOption": "No", + "actionsColumn": "Actions", + "createServerButton": "Create Server", + "labelName": "Name", + "diskUsageDescription": "Here is the disk usage of the server.", + "servicesStatusDescription": "Here is the status of the server services.", + "oglivesDescription": "Here are the OgLives installed on the server.", + "addImageButtonDescription": "Click to add a new image.", + "adminPxeDescription": "From here you can manage the PXE templates of the server.", + "addTemplateButtonDescription": "Add PXE Template", + "addTemplateButton": "Add Template", + "searchSyncDescription": "Filter PXE templates to show only synchronized or unsynchronized ones.", + "advancedNetbootDescription": "From here you can configure the advanced netboot of the clients.", + "selectUnitDescription": "Select the organizational unit to which the clients belong.", + "selectClassDescription": "Select the classroom to which the clients belong.", + "applyToAllDescription": "Select a template to apply to all clients.", + "saveButtonDescription": "Save the changes made." } diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 378a8d3..9221d7b 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -96,6 +96,7 @@ "enabled": "Habilitado", "disabled": "Deshabilitado", "adminCommandsTitle": "Trazas de comandos y procedimientos", + "CommandsTitle": "Administrar Comandos", "resetFiltersStepText": "Haz clic para reiniciar los filtros aplicados y ver todas las trazas.", "resetFilters": "Reiniciar filtros", "clientSelectStepText": "Selecciona un cliente para ver las trazas asociadas.", @@ -340,5 +341,40 @@ "addClientButton": "Añadir cliente", "searchClientNameLabel": "Buscar nombre de cliente", "searchIPLabel": "Buscar IP", - "searchMACLabel": "Buscar MAC" + "searchMACLabel": "Buscar MAC", + "diskUsageTitle": "Uso de disco", + "ogBootServerStatus": "Estado del servidor OgBoot", + "servicesTitle": "Servicios", + "Legend": "Leyenda", + "totalLabel": "Total", + "usedLabel": "Usado", + "freeLabel": "Libre", + "availableLabel": "Disponible", + "InstalledOglivesTitle": "OgLive instalados", + "idLabel": "ID", + "KernelLabel": "Kernel", + "architectureLabel": "Arquitectura", + "revisionLabel": "Revisión", + "serverInfoTitle": "Información del servidor", + "adminPxeTitle": "Administrar ficheros PXE", + "createdOgBootLabel": "Creado en OgBoot", + "selectOptionPlaceholder": "Selecciona una opción", + "yesOption": "Sí", + "noOption": "No", + "actionsColumn": "Acciones", + "createServerButton": "Crear servidor", + "labelName": "Nombre", + "diskUsageDescription": "Aquí se muestra el uso de disco del servidor.", + "servicesStatusDescription": "Aquí se muestra el estado de los servicios del servidor.", + "oglivesDescription": "Aquí se muestran los OgLive instalados en el servidor.", + "addImageButtonDescription": "Haz clic para añadir una nueva imagen.", + "adminPxeDescription": "Desde aquí puedes gestionar las plantillas PXE del servidor.", + "addTemplateButtonDescription": "Añadir plantilla PXE", + "addTemplateButton": "Añadir plantilla", + "searchSyncDescription": "Filtra las plantillas PXE para mostrar solo las sincronizadas o no sincronizadas.", + "advancedNetbootDescription": "Desde aquí puedes configurar el netboot avanzado de los clientes.", + "selectUnitDescription": "Selecciona la unidad organizativa a la que pertenecen los clientes.", + "selectClassDescription": "Selecciona el aula a la que pertenecen los clientes.", + "applyToAllDescription": "Selecciona una plantilla para aplicar a todos los clientes.", + "saveButtonDescription": "Guarda los cambios realizados." }