feat(i18n): migrate hardcoded German strings to t() across 104 components/pages — AST-based batch with re-parse gate, 423 new de.json keys; tsc clean; vitest failures byte-identical to clean-tree baseline (pre-existing)
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
||||
import { NavLink, Outlet } from 'react-router-dom';
|
||||
import { useUIStore } from '@/store/uiStore';
|
||||
import { ChevronRight, ChevronDown, ScrollText, FileText, AlertTriangle, ArrowLeft } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface LogNode {
|
||||
title: string;
|
||||
@@ -40,6 +41,7 @@ const LOG_TREE: LogNode[] = [
|
||||
];
|
||||
|
||||
function TreeItem({ node, depth }: { node: LogNode; depth: number }) {
|
||||
const { t } = useTranslation();
|
||||
const [expanded, setExpanded] = useState(depth < 1);
|
||||
const hasChildren = node.children && node.children.length > 0;
|
||||
const paddingLeft = depth * 16 + 12;
|
||||
@@ -87,6 +89,7 @@ function TreeItem({ node, depth }: { node: LogNode; depth: number }) {
|
||||
}
|
||||
|
||||
export function LogsPage() {
|
||||
const { t } = useTranslation();
|
||||
const sidebarOpen = useUIStore((state) => state.sidebarOpen);
|
||||
|
||||
return (
|
||||
@@ -97,14 +100,14 @@ export function LogsPage() {
|
||||
<button
|
||||
onClick={() => window.location.href = '/start'}
|
||||
className="p-1.5 rounded-md text-secondary-400 hover:bg-secondary-100 hover:text-secondary-700 flex items-center justify-center focus:outline-none"
|
||||
aria-label="Zurück zur Startseite"
|
||||
title="Zurück zur Startseite"
|
||||
aria-label={t('logs.zurückzurstartseite')}
|
||||
title={t('logs.zurückzurstartseite')}
|
||||
>
|
||||
<ArrowLeft className="w-4 h-4" />
|
||||
</button>
|
||||
<h1 className="text-xl font-bold text-secondary-900">Logs</h1>
|
||||
</div>
|
||||
<nav className="space-y-0.5 overflow-y-auto" role="navigation" aria-label="Logs Navigation">
|
||||
<nav className="space-y-0.5 overflow-y-auto" role="navigation" aria-label={t('logs.logsnavigation')}>
|
||||
{LOG_TREE.map((node) => (
|
||||
<TreeItem key={node.title} node={node} depth={0} />
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user