diff --git a/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.html b/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.html
index c234ce7..9adcfad 100644
--- a/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.html
+++ b/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.html
@@ -4,7 +4,7 @@
- Estás viendo la demo en modo solo lectura — los cambios están deshabilitados.
+ {{ 'dash.demoBanner' | t }}
}
diff --git a/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.ts b/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.ts
index abb63b2..78181d5 100644
--- a/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.ts
+++ b/bikontrol-web/src/app/modules/dashboard/components/dashboard-layout/dashboard-layout.component.ts
@@ -5,9 +5,11 @@ import { BottomNavComponent } from '../../../../shared/components/bottom-nav/bot
import { RouterOutlet } from '@angular/router';
import { AuthService } from '../../../auth/services/auth.service';
+import { TranslatePipe } from '../../../../shared/i18n/translate.pipe';
+
@Component({
selector: 'app-dashboard-layout',
- imports: [TopNavComponent, BottomNavComponent, RouterOutlet],
+ imports: [TopNavComponent, BottomNavComponent, RouterOutlet, TranslatePipe],
templateUrl: './dashboard-layout.component.html',
changeDetection: ChangeDetectionStrategy.Eager,
styleUrl: './dashboard-layout.component.scss',
diff --git a/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.html b/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.html
index e67da3b..39ce125 100644
--- a/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.html
+++ b/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.html
@@ -25,7 +25,9 @@
{{ motorcycle.name }}
{{ motorcycle.brand }} - {{ motorcycle.year }}
- Apodo: {{ motorcycle.nickname }}
+
+ {{ 'motoCard.nickname' | t: { name: motorcycle.nickname } }}
+
@@ -66,7 +68,7 @@
85-28-29 57 57-29-28Z"
/>
- Editar
+ {{ 'motoCard.edit' | t }}
- Borrar
+ {{ 'motoCard.delete' | t }}
}
diff --git a/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.ts b/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.ts
index 3b5dbf2..9bc5c67 100644
--- a/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.ts
+++ b/bikontrol-web/src/app/modules/dashboard/components/motorcycle-card/motorcycle-card.component.ts
@@ -16,9 +16,12 @@ import { SwalService } from '../../../../shared/services/swal.service';
import { HttpErrorService } from '../../../../shared/services/http-error.service';
import { AuthService } from '../../../auth/services/auth.service';
+import { TranslatePipe } from '../../../../shared/i18n/translate.pipe';
+import { I18nService } from '../../../../shared/i18n/i18n.service';
+
@Component({
selector: 'app-motorcycle-card',
- imports: [],
+ imports: [TranslatePipe],
templateUrl: './motorcycle-card.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
styleUrl: './motorcycle-card.component.scss',
@@ -29,6 +32,7 @@ export class MotorcycleCardComponent implements OnInit {
private swal = inject(SwalService);
private httpError = inject(HttpErrorService);
private authService = inject(AuthService);
+ private i18n = inject(I18nService);
@Input() motorcycle!: Motorcycle;
@Output() deleted = new EventEmitter();
@@ -67,14 +71,11 @@ export class MotorcycleCardComponent implements OnInit {
this.motorcyclesService.deleteMotorcycle(this.motorcycle.id!).subscribe({
next: () => {
this.swal
- .success('¡Eliminada!', 'La motocicleta fue eliminada correctamente.')
+ .success(this.i18n.t('motoCard.deletedTitle'), this.i18n.t('motoCard.deletedText'))
.then(() => this.deleted.emit());
},
error: (err) => {
- this.swal.error(
- 'Error',
- this.httpError.message(err, 'No se pudo eliminar la motocicleta.'),
- );
+ this.swal.error('Error', this.httpError.message(err, this.i18n.t('motoCard.deleteError')));
},
});
}
@@ -84,10 +85,10 @@ export class MotorcycleCardComponent implements OnInit {
this.swal
.confirm(
- '¿Estás seguro?',
- `Esto eliminará permanentemente "${this.motorcycle.name}".`,
- 'Sí, eliminar',
- 'Cancelar',
+ this.i18n.t('motoCard.deleteConfirmTitle'),
+ this.i18n.t('motoCard.deleteConfirmText', { name: this.motorcycle.name }),
+ this.i18n.t('common.yesDelete'),
+ this.i18n.t('common.cancel'),
'warning',
)
.then((result) => {
diff --git a/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.html b/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.html
index 5768441..7cd823f 100644
--- a/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.html
+++ b/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.html
@@ -1,19 +1,17 @@
-
Bienvenido de nuevo
-
Tus motocicletas
+
{{ 'home.welcome' | t }}
+
{{ 'home.subtitle' | t }}
@if (motorcycles.value().length === 0) {
-
¡Te damos la bienvenida!
-
- Agregá tu moto y elegí un plan de mantenimiento en un par de minutos.
-
+
{{ 'home.emptyTitle' | t }}
+
{{ 'home.emptyText' | t }}
@if (!isDemo) {
}
@@ -34,7 +32,7 @@
¡Te damos la bienvenida!
routerLink="/dashboard/motorcycles/add"
class="w-full mt-6 py-2 bg-primary text-textlight rounded-lg hover:bg-accent transition-colors"
>
- + Agregar motocicleta
+ {{ 'home.addMotorcycle' | t }}
}
diff --git a/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.ts b/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.ts
index 5dc9fa8..680dca6 100644
--- a/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.ts
+++ b/bikontrol-web/src/app/modules/dashboard/pages/home/home.component.ts
@@ -6,9 +6,11 @@ import { MotorcyclesService } from '../../service/motorcycles.service';
import { SwalService } from '../../../../shared/services/swal.service';
import { HttpErrorService } from '../../../../shared/services/http-error.service';
+import { TranslatePipe } from '../../../../shared/i18n/translate.pipe';
+
@Component({
selector: 'app-home',
- imports: [MotorcycleCardComponent, RouterModule],
+ imports: [MotorcycleCardComponent, RouterModule, TranslatePipe],
templateUrl: './home.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
styleUrl: './home.component.scss',
diff --git a/bikontrol-web/src/app/modules/dashboard/pages/motorcycles/motorcycle-summary/motorcycle-summary.component.html b/bikontrol-web/src/app/modules/dashboard/pages/motorcycles/motorcycle-summary/motorcycle-summary.component.html
index 3538f2d..30c91e9 100644
--- a/bikontrol-web/src/app/modules/dashboard/pages/motorcycles/motorcycle-summary/motorcycle-summary.component.html
+++ b/bikontrol-web/src/app/modules/dashboard/pages/motorcycles/motorcycle-summary/motorcycle-summary.component.html
@@ -16,7 +16,7 @@
{{ m.brand }}
{{ m.name }}
- {{ m.nickname || 'Sin apodo' }}
+ {{ m.nickname || ('motoCard.noNickname' | t) }}
@@ -24,9 +24,13 @@ {{ m.name }}
class="km-card bg-gray-800 rounded-xl shadow-md p-4 my-6 hover:shadow-lg transition-shadow relative"
>
@@ -58,7 +62,7 @@ {{ m.name }}
[disabled]="isExporting()"
class="flex-1 py-2 border border-accent text-primary rounded-lg hover:bg-gray-50 transition-colors text-sm font-semibold disabled:opacity-50"
>
- Exportar libro (PDF)
+ {{ 'summary.exportPdf' | t }}
-
Proximos Mantenimientos
+
{{ 'summary.upcoming' | t }}
@if (!isDemo()) {
}
@if (upcomingMaintenances().length > 0) {
@@ -107,48 +111,57 @@
{{ maintenance.name }}
@if (maintenance.trackingType === 'Km') {
{{
- maintenance.isOverdue
- ? 'Vencido por ' + maintenance.remainingKm * -1 + ' km'
- : 'Faltan ' + maintenance.remainingKm + ' km'
+ (maintenance.isOverdue ? 'summary.overdueKm' : 'summary.remainingKm')
+ | t
+ : {
+ n: maintenance.isOverdue
+ ? maintenance.remainingKm * -1
+ : maintenance.remainingKm,
+ }
}}
}
@if (maintenance.trackingType === 'Time') {
{{
- maintenance.isOverdue
- ? 'Vencido por ' + maintenance.remainingDays * -1 + ' día(s)'
- : 'Faltan ' + maintenance.remainingDays + ' día(s)'
+ (maintenance.isOverdue ? 'summary.overdueDays' : 'summary.remainingDays')
+ | t
+ : {
+ n: maintenance.isOverdue
+ ? maintenance.remainingDays * -1
+ : maintenance.remainingDays,
+ }
}}
}
@if (maintenance.lastPerformedAt) {
- Último mantenimiento: {{ maintenance.lastPerformedAt | date: 'yyyy-MM-dd' }}
+ {{
+ 'summary.lastPerformed'
+ | t: { date: (maintenance.lastPerformedAt | date: 'yyyy-MM-dd') }
+ }}
}
}
} @else {
-
- Aún no has agregado mantenimientos para esta moto.
-
+ {{ 'summary.noMaintenances' | t }}
}
@if (!isDemo()) {
}
@defer (on viewport) {
-
Registro de mantenimientos
+
{{ 'summary.records' | t }}
@if (maintenanceRecords().length > 0) {
@for (record of maintenanceRecords(); track record) {
@@ -160,25 +173,35 @@
{{ record.maintenanceName }}
}}
@if (record.performedKm != null) {
-
Km: {{ record.performedKm }}
+
+ {{ 'summary.recordKm' | t: { n: record.performedKm } }}
+
}
@if (record.cost != null) {
- Costo: {{ record.cost | currency: 'COP' : 'symbol-narrow' : '1.0-2' }}
+ {{
+ 'summary.recordCost'
+ | t: { c: (record.cost | currency: 'COP' : 'symbol-narrow' : '1.0-2') }
+ }}
}
} @else {
-
- Aún no hay registros de mantenimientos para esta moto.
-
+
{{ 'summary.noRecords' | t }}
}
} @placeholder {
-
Cargando registros…
+
{{ 'summary.loadingRecords' | t }}
}
} @else {
-
No se encontró información de la motocicleta.
-
Serás redirigido al inicio en breve.
+
{{ 'summary.notFound' | t }}
+
{{ 'summary.redirecting' | t }}
}
@if (isEditKmModalOpen()) {
-
Ingrese el nuevo Kilometraje de su motocicleta
+
{{ 'summary.editKmTitle' | t }}
-
-
+
+
}
@if (viewerImage(); as image) {
-