I18n: naprawa build tsc -b - usuniete nieuzywane importy i18n (app), wrapperki t() w Logs/Verifications zwracaja string (admin)

This commit is contained in:
tisachi
2026-10-17 16:18:37 +02:00
parent 9477d66bb1
commit defc0407f8
5 changed files with 4 additions and 7 deletions

View File

@@ -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<string, unknown>) =>
i18n.t(`logs:${key}`, options as never);
const t = (key: string, options?: Record<string, unknown>): string =>
String(i18n.t(`logs:${key}`, options as never));
export const ACTION_KEYS = [
'user.registered',

View File

@@ -28,8 +28,8 @@ import { fmtDate } from '../lib/format';
import i18n from '../i18n';
import { useTopbar } from '../topbar';
const t = (key: string, options?: Record<string, unknown>) =>
i18n.t(`verifications:${key}`, options as never);
const t = (key: string, options?: Record<string, unknown>): string =>
String(i18n.t(`verifications:${key}`, options as never));
const STATUS_META: Record<ClaimStatus, { labelKey: string; color: BadgeColor }> = {
PENDING: { labelKey: 'statusPending', color: 'yellow' },

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';