Refactor translation keys in HTML templates
testing/ogGui-multibranch/pipeline/head This commit is unstable Details

pull/10/head
Alvaro Puente Mella 2024-12-05 14:16:23 +01:00
parent 3a7eaddcce
commit 81e20ec9f9
5 changed files with 45 additions and 18 deletions

View File

@ -1,5 +1,5 @@
<div class="header-container">
<h2 class="title">{{ 'adminImagesTitle' | translate }}</h2>
<h2 class="title">{{ 'adminUsersTitle' | translate }}</h2>
<div class="images-button-row">
<button mat-flat-button color="primary" (click)="addUser()">
{{ 'addUser' | translate }}

View File

@ -92,7 +92,7 @@
</button>
<button mat-menu-item (click)="onDeleteClick($event, unidad)">
<mat-icon>delete</mat-icon>
<span>Delete</span>
<span>{{ 'delete' | translate }}</span>
</button>
</mat-menu>
</mat-card-actions>
@ -241,7 +241,7 @@
<div class="clients-table" *ngIf="currentView === 'list'">
<table mat-table matSort [dataSource]="selectedClients" class="mat-elevation-z8">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Nombre </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'name' | translate }} </th>
<td mat-cell *matCellDef="let client"> {{ client.name }} </td>
</ng-container>
<ng-container matColumnDef="ip">
@ -257,7 +257,7 @@
<td mat-cell *matCellDef="let client"> {{ client.oglive }} </td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Estado </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'status' | translate }} </th>
<td mat-cell *matCellDef="let client">
<mat-chip [ngClass]="{
'chip-og-live': client.status === 'og-live',
@ -272,25 +272,25 @@
</td>
</ng-container>
<ng-container matColumnDef="maintenace">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Mantenimiento </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'maintenance' | translate }} </th>
<td mat-cell *matCellDef="let client"> {{ client.mantenimiento }} </td>
</ng-container>
<ng-container matColumnDef="subnet">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Subred </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'subnet' | translate }} </th>
<td mat-cell *matCellDef="let client"> {{ client.subnet }} </td>
</ng-container>
<ng-container matColumnDef="pxeTemplate">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Plantilla PXE </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'pxeTemplate' | translate }} </th>
<td mat-cell *matCellDef="let client"> {{ client.pxeTemplate }} </td>
</ng-container>
<ng-container matColumnDef="parentName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Padre </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'parent' | translate }} </th>
<td mat-cell *matCellDef="let client"> {{ client.parentName }} </td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Acciones </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'actions' | translate }} </th>
<td mat-cell *matCellDef="let client">
<button mat-icon-button [matMenuTriggerFor]="clientMenu">
<mat-icon>more_vert</mat-icon>
@ -299,20 +299,20 @@
<button mat-menu-item *ngIf="(!syncStatus || syncingClientId !== client.uuid)" (click)="getStatus(client)">
<mat-icon>sync</mat-icon>
<span>Sincronizar</span>
<span>{{ 'sync' | translate }}</span>
</button>
<button mat-menu-item (click)="onEditClick($event, client.type, client.uuid)">
<mat-icon>edit</mat-icon>
<span>Edit</span>
<span>{{ 'edit' | translate }}</span>
</button>
<button mat-menu-item (click)="onShowClientDetail($event, client)">
<mat-icon>visibility</mat-icon>
<span>Ver detalles</span>
<span>{{ 'viewDetails' | translate }}</span>
</button>
<button mat-menu-item (click)="onDeleteClick($event, client, selectedNode)">
<mat-icon>delete</mat-icon>
<span>Delete</span>
<span>{{ 'delete' | translate }}</span>
</button>
</mat-menu>
</td>

View File

@ -18,10 +18,10 @@
<h3>Añadir múltiples clientes</h3>
<div class="upload-container">
<button mat-raised-button color="primary" (click)="fileInput.click()">Subir fichero</button>
<input #fileInput type="file" (change)="onFileUpload($event)" accept=".csv" hidden>
<input #fileInput type="file" (change)="onFileUpload($event)" accept="*" hidden>
<p>o añadelos manualmente:</p>
<div *ngIf="showTextarea">
<textarea #textarea matInput placeholder="host bbaa-it1-1..." rows="20" cols="100"></textarea>
<textarea #textarea matInput placeholder="Ejemplo: host bbaa-it1-11 { hardware ethernet a0:48:1c:8a:f1:5b; fixed-address 172.17.69.11; };" rows="20" cols="100"></textarea>
<button mat-raised-button color="primary" (click)="onTextarea(textarea.value)">cargar</button>
</div>
</div>

View File

@ -232,7 +232,6 @@
"editClientDialogTitle": "Edit Client",
"organizationalUnitLabel": "Parent",
"ogLiveLabel": "OgLive",
"repositoryLabel": "Repository",
"serialNumberLabel": "Serial Number",
"netifaceLabel": "Network interface",
"netDriverLabel": "Network driver",
@ -422,5 +421,28 @@
"search": "Search",
"TOOLTIP_SEARCH": "Search function (option disabled)",
"detailsOf": "Details of",
"filters": "Filters"
"editUnitMenu": "Edit",
"addInternalUnitMenu": "Add",
"addClientMenu": "Add client",
"filters": "Filters",
"searchClient": "Search client",
"searchTree": "Search in tree",
"filterByType": "Filter by type",
"all": "All",
"classroomsGroup": "Classroom groups",
"classrooms": "Classrooms",
"computerGroups": "PC groups",
"executeCommand": "Execute command",
"roomMap": "Classroom map",
"addOrganizationalUnit": "Add organizational unit",
"edit": "Edit",
"delete": "Delete",
"clients": "Clients",
"sync": "Sync",
"viewDetails": "View details",
"name": "Name",
"maintenance": "Maintenance",
"subnet": "Subnet",
"parent": "Parent",
"adminUsersTitle": "Manage users"
}

View File

@ -441,5 +441,10 @@
"delete": "Eliminar",
"clients": "Clientes",
"sync": "Sincronizar",
"viewDetails": "Ver detalles"
"viewDetails": "Ver detalles",
"name": "Nombre",
"maintenance": "Mantenimiento",
"subnet": "Subred",
"parent": "Padre",
"adminUsersTitle": "Administrar usuarios"
}