From bdd6206e18b0d20f402620848a08a68e885ee7ff Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Wed, 7 May 2025 11:58:51 +0200 Subject: [PATCH 1/3] Refactor execute command component: replace command names with translation keys and update localization files for execute commands --- .../execute-command.component.html | 2 +- .../execute-command.component.ts | 24 +++++++++---------- .../components/groups/groups.component.html | 2 +- ogWebconsole/src/locale/en.json | 17 +++++++++++-- ogWebconsole/src/locale/es.json | 15 +++++++++++- 5 files changed, 43 insertions(+), 17 deletions(-) diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.html b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.html index 0d66031..400dc52 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.html @@ -19,6 +19,6 @@ \ No newline at end of file diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts index 8bff5aa..1b871a4 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts @@ -21,17 +21,17 @@ export class ExecuteCommandComponent implements OnInit { loading: boolean = true; arrayCommands: any[] = [ - { name: 'Enceder', slug: 'power-on', disabled: false }, - { name: 'Apagar', slug: 'power-off', disabled: false }, - { name: 'Reiniciar', slug: 'reboot', disabled: false }, - { name: 'Iniciar Sesión', slug: 'login', disabled: true }, - { name: 'Crear imagen', slug: 'create-image', disabled: false }, - { name: 'Clonar/desplegar imagen', slug: 'deploy-image', disabled: false }, - { name: 'Eliminar Imagen Cache', slug: 'delete-image-cache', disabled: true }, - { name: 'Particionar y Formatear', slug: 'partition', disabled: false }, - { name: 'Inventario Software', slug: 'software-inventory', disabled: true }, - { name: 'Inventario Hardware', slug: 'hardware-inventory', disabled: true }, - { name: 'Ejecutar comando', slug: 'run-script', disabled: false }, + { translationKey: 'executeCommands.powerOn', slug: 'power-on', disabled: false }, + { translationKey: 'executeCommands.powerOff', slug: 'power-off', disabled: false }, + { translationKey: 'executeCommands.reboot', slug: 'reboot', disabled: false }, + { translationKey: 'executeCommands.login', slug: 'login', disabled: true }, + { translationKey: 'executeCommands.createImage', slug: 'create-image', disabled: false }, + { translationKey: 'executeCommands.deployImage', slug: 'deploy-image', disabled: false }, + { translationKey: 'executeCommands.deleteImageCache', slug: 'delete-image-cache', disabled: true }, + { translationKey: 'executeCommands.partition', slug: 'partition', disabled: false }, + { translationKey: 'executeCommands.softwareInventory', slug: 'software-inventory', disabled: true }, + { translationKey: 'executeCommands.hardwareInventory', slug: 'hardware-inventory', disabled: true }, + { translationKey: 'executeCommands.runScript', slug: 'run-script', disabled: false }, ]; client: any = {}; @@ -232,7 +232,7 @@ export class ExecuteCommandComponent implements OnInit { this.router.navigate(['/clients/run-script'], { queryParams: { - clientData: JSON.stringify(clientDataToSend) , + clientData: JSON.stringify(clientDataToSend), runScriptContext: JSON.stringify(this.runScriptContext) } }) diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index bdddf21..a338c2d 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -205,7 +205,7 @@ {{ 'partitions' | translate }} diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 12b3cd2..136bb66 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -489,10 +489,23 @@ "usedPercentageLabel": "Used", "errorLoadingData": "Error fetching data. Service not available", "repositoryTitleStep": "On this screen you can manage image repositories.", - "partitions": "Particiones", + "partitions": "Partitions", "clientsViewStepText": "Display of the selected organizational unit's clients", "vistalista": "List View", "vistatarjeta": "Card View", "ejecutarComandos": "Execute Commands", - "searchState": "Search state" + "searchState": "Search state", + "executeCommands": { + "powerOn": "Power On", + "powerOff": "Shut Down", + "reboot": "Reboot", + "login": "Login", + "createImage": "Create Image", + "deployImage": "Deploy Image", + "deleteImageCache": "Delete Image Cache", + "partition": "Partition and Format", + "softwareInventory": "Software Inventory", + "hardwareInventory": "Hardware Inventory", + "runScript": "Run Script" + } } \ No newline at end of file diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 84e3fc3..26a05f3 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -496,5 +496,18 @@ "vistalista": "Vista Lista", "vistatarjeta": "Vista Tarjeta", "ejecutarComandos": "Ejecutar Comandos", - "searchState": "Buscar por estado" + "searchState": "Buscar por estado", + "executeCommands": { + "powerOn": "Encender", + "powerOff": "Apagar", + "reboot": "Reiniciar", + "login": "Iniciar Sesión", + "createImage": "Crear imagen", + "deployImage": "Clonar/desplegar imagen", + "deleteImageCache": "Eliminar Imagen Cache", + "partition": "Particionar y Formatear", + "softwareInventory": "Inventario Software", + "hardwareInventory": "Inventario Hardware", + "runScript": "Ejecutar script" + } } \ No newline at end of file From 2dce55ce1d1c87115e313bee8b71d121c8757b3d Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Wed, 7 May 2025 12:19:00 +0200 Subject: [PATCH 2/3] Refactor legend component: update remote access titles to use translation keys and enhance localization files --- .../components/groups/shared/legend/legend.component.html | 6 +++--- ogWebconsole/src/locale/en.json | 4 +++- ogWebconsole/src/locale/es.json | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/legend/legend.component.html b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.html index 6cd66de..3d02ad5 100644 --- a/ogWebconsole/src/app/components/groups/shared/legend/legend.component.html +++ b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.html @@ -22,11 +22,11 @@ school -
Disponible acceso remoto
+
{{ 'remoteAccess' | translate }}
school -
No disponible acceso remoto
+
{{ 'noRemoteAccess' | translate }}
- + \ No newline at end of file diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 136bb66..7b4239a 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -507,5 +507,7 @@ "softwareInventory": "Software Inventory", "hardwareInventory": "Hardware Inventory", "runScript": "Run Script" - } + }, + "remoteAccess": "Remote access available", + "noRemoteAccess": "Remote access not available" } \ No newline at end of file diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 26a05f3..9f9bedf 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -509,5 +509,7 @@ "softwareInventory": "Inventario Software", "hardwareInventory": "Inventario Hardware", "runScript": "Ejecutar script" - } + }, + "remoteAccess": "Disponible acceso remoto", + "noRemoteAccess": "No disponible acceso remoto" } \ No newline at end of file From f35ba106bab5a7c561a01f5ffe1ae79b75bdbdac Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Wed, 7 May 2025 13:45:40 +0200 Subject: [PATCH 3/3] refs #1953 Refactor manage organizational unit component: replace hardcoded strings with translation keys and update localization files --- .../manage-organizational-unit.component.html | 114 +++++++++--------- ogWebconsole/src/locale/en.json | 3 +- ogWebconsole/src/locale/es.json | 3 +- 3 files changed, 62 insertions(+), 58 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.html index a72d549..739256b 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.html +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.html @@ -1,12 +1,13 @@
-

{{ isEditMode ? 'Editar' : 'Crear' }} Unidad Organizativa

-
+

{{ isEditMode ? ('edit' | translate) : ('createButton' | translate) }} {{ + 'labelOrganizationalUnit' | translate }}

+
- - General + + {{ 'generalTabLabel' | translate }}
- Tipo + {{ 'typeLabel' | translate }} {{ typeTranslations[type] }} @@ -14,11 +15,11 @@ - Nombre + {{ 'nameColumnHeader' | translate }} - Unidad organizativa superior + {{ 'createOrgUnitparentLabel' | translate }} {{ getSelectedParentName() }} @@ -31,7 +32,7 @@ - Descripción + {{ 'descriptionLabel' |translate }} @@ -41,22 +42,23 @@
- Información del aula + {{'classroomInfoStepLabel' | translate}}
- Localización + {{ 'locationLabel' | translate }} - Aforo + {{ 'capacityLabel' | translate }} - El aforo no puede ser negativo + {{ 'capacityWarning' | translate }} - Calendario Asociado + {{ 'associatedCalendarLabel' | translate }} {{ calendar.name }} @@ -64,32 +66,32 @@
- Proyector - Pizarra + {{ 'projectorAlt' | translate }} + {{ 'boardToggle' | translate }}
- Configuración de Red + {{ 'networkSettingsStepLabel' | translate }}
- - OgLive - - - {{ oglive.name }} - - - - - Plantilla PXE - - - {{ template.name }} - - - - Repositorio + OgLive + + + {{ oglive.name }} + + + + + {{ 'templateLabel' | translate }} + + + {{ template.name }} + + + + + {{ 'repositoryLabel' | translate }} {{ repository.name }} @@ -105,17 +107,17 @@ - Máscara de Red + {{ 'netmaskLabel' | translate }} - - Interfaz de red - - - {{ type.name }} - - - + + {{ 'netifaceLabel' | translate }} + + + {{ type.name }} + + + Router @@ -125,7 +127,7 @@ - Modo P2P + {{ 'p2pModeLabel' | translate }} {{ option.name }} @@ -133,23 +135,23 @@ - Tiempo P2P + {{ 'p2pTimeLabel' | translate }} - Mcast IP + {{ 'mcastIpLabel' | translate }} - Mcast Speed + {{ 'mcastSpeedLabel' | translate }} - Mcast Port + {{ 'mcastPortLabel' | translate }} - Mcast Mode + {{ 'mcastModeLabel' | translate }} {{ option.name }} @@ -157,7 +159,7 @@ - Menu + {{ 'menuLabel' | translate }} {{ menu.name }} @@ -165,28 +167,28 @@ - Perfil de Hardware + {{ 'hardwareProfileLabel' | translate }} {{ unit.description }} - Formato de URL incorrecto + {{ 'urlFormatError' | translate }}
- Información Adicional + {{ 'additionalInfoStepLabel' | translate }}
- Comentarios + {{ 'commentsLabel' | translate }}
- + + isEditMode ? ('edit' | translate) : ('createButton' | translate) }}
-
+
\ No newline at end of file diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 7b4239a..e829ced 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -509,5 +509,6 @@ "runScript": "Run Script" }, "remoteAccess": "Remote access available", - "noRemoteAccess": "Remote access not available" + "noRemoteAccess": "Remote access not available", + "capacityWarning": "The capacity cannot be negative" } \ No newline at end of file diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 9f9bedf..92d37a3 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -511,5 +511,6 @@ "runScript": "Ejecutar script" }, "remoteAccess": "Disponible acceso remoto", - "noRemoteAccess": "No disponible acceso remoto" + "noRemoteAccess": "No disponible acceso remoto", + "capacityWarning": "El aforo no puede ser" } \ No newline at end of file