From defc0407f8b9c3fa7caa9831add04c769c4b5864 Mon Sep 17 00:00:00 2001 From: tisachi Date: Sat, 17 Oct 2026 16:18:37 +0200 Subject: [PATCH] I18n: naprawa build tsc -b - usuniete nieuzywane importy i18n (app), wrapperki t() w Logs/Verifications zwracaja string (admin) --- admin/src/pages/Logs.tsx | 4 ++-- admin/src/pages/Verifications.tsx | 4 ++-- app/src/components/ExerciseProgressCards.tsx | 1 - app/src/pages/Dashboard.tsx | 1 - app/src/pages/trainees/trainee-detail/TraineeCalendarTab.tsx | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/admin/src/pages/Logs.tsx b/admin/src/pages/Logs.tsx index 16c08e8..4ea677b 100644 --- a/admin/src/pages/Logs.tsx +++ b/admin/src/pages/Logs.tsx @@ -11,8 +11,8 @@ import { useListSearch } from '../store/list-search'; import i18n from '../i18n'; import { fmtDateTime } from '../lib/format'; -const t = (key: string, options?: Record) => - i18n.t(`logs:${key}`, options as never); +const t = (key: string, options?: Record): string => + String(i18n.t(`logs:${key}`, options as never)); export const ACTION_KEYS = [ 'user.registered', diff --git a/admin/src/pages/Verifications.tsx b/admin/src/pages/Verifications.tsx index 1cf9a5d..b708ddc 100644 --- a/admin/src/pages/Verifications.tsx +++ b/admin/src/pages/Verifications.tsx @@ -28,8 +28,8 @@ import { fmtDate } from '../lib/format'; import i18n from '../i18n'; import { useTopbar } from '../topbar'; -const t = (key: string, options?: Record) => - i18n.t(`verifications:${key}`, options as never); +const t = (key: string, options?: Record): string => + String(i18n.t(`verifications:${key}`, options as never)); const STATUS_META: Record = { PENDING: { labelKey: 'statusPending', color: 'yellow' }, diff --git a/app/src/components/ExerciseProgressCards.tsx b/app/src/components/ExerciseProgressCards.tsx index 4d2698b..112761e 100644 --- a/app/src/components/ExerciseProgressCards.tsx +++ b/app/src/components/ExerciseProgressCards.tsx @@ -14,7 +14,6 @@ import { } from 'recharts'; import type { ExerciseProgress } from '../api/types'; import { fmtDate, fmtVolume } from '../lib/format'; -import i18n from '../i18n'; import { resolveLocaleTag } from '../i18n/language'; import { localizedName } from '../lib/localizedName'; import { muscleName } from '../lib/labels'; diff --git a/app/src/pages/Dashboard.tsx b/app/src/pages/Dashboard.tsx index 4d851b3..796954d 100644 --- a/app/src/pages/Dashboard.tsx +++ b/app/src/pages/Dashboard.tsx @@ -16,7 +16,6 @@ import { import { localizedName } from '../lib/localizedName'; import { muscleName } from '../lib/labels'; import { useTopbar } from '../topbar'; -import i18n from '../i18n'; import { resolveLocaleTag } from '../i18n/language'; import { Button, Card, EmptyState, ErrorText, SectionHeader, Skeleton } from '../components/ui'; diff --git a/app/src/pages/trainees/trainee-detail/TraineeCalendarTab.tsx b/app/src/pages/trainees/trainee-detail/TraineeCalendarTab.tsx index 7ac11cd..ba259cf 100644 --- a/app/src/pages/trainees/trainee-detail/TraineeCalendarTab.tsx +++ b/app/src/pages/trainees/trainee-detail/TraineeCalendarTab.tsx @@ -1,6 +1,5 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import i18n from '../../../i18n'; import { resolveLocaleTag } from '../../../i18n/language'; import { monthStr } from '../../../lib/format'; import { localizedName } from '../../../lib/localizedName';