diff --git a/frontend/src/components/LayoutBar.tsx b/frontend/src/components/LayoutBar.tsx index a335836..768f45d 100644 --- a/frontend/src/components/LayoutBar.tsx +++ b/frontend/src/components/LayoutBar.tsx @@ -11,6 +11,7 @@ import type { LayoutDefinition } from '../types/cad.types'; import { getActiveDocument, onActiveDocumentChanged } from '../kernel/document/documentService'; import { insertTitleBlockForLayout } from '../services/titleBlockService'; import { printLayout } from '../services/printService'; +import { useT } from '../i18n/strings'; export interface LayoutView { center: { x: number; y: number }; @@ -80,6 +81,8 @@ const WIDGET_W = 100; const WIDGET_H = 80; const LayoutBar: React.FC = ({ doc: docProp, bridge: bridgeProp }) => { + const t = useT(); + const [doc, setDoc] = useState(docProp ?? getActiveDocument()); const [layouts, setLayouts] = useState([]); @@ -134,23 +137,23 @@ const LayoutBar: React.FC = ({ doc: docProp, bridge: bridgeProp return (
- Layouts + {t('layouts.title')}
{layouts.length === 0 ? ( -
Keine Layouts
+
{t('layouts.empty')}
) : (
{layouts.map((l) => { @@ -161,7 +164,7 @@ const LayoutBar: React.FC = ({ doc: docProp, bridge: bridgeProp type="button" className="layout-bar-entry" data-testid={`layout-entry-${l.id}`} - title={`Zoom zu ${l.name}`} + title={t('layouts.zoomto', l.name)} onClick={() => handleZoomTo(l)} > = ({ doc: docProp, bridge: bridgeProp
diff --git a/frontend/src/components/Topbar.tsx b/frontend/src/components/Topbar.tsx index b67416c..197f88f 100644 --- a/frontend/src/components/Topbar.tsx +++ b/frontend/src/components/Topbar.tsx @@ -2,12 +2,15 @@ import React from 'react'; import type { TopbarProps } from '../types/ui.types'; import type { UnitType } from '../utils/format'; import { useUIMode, toggleUIMode, getUIMode } from '../services/uiModeService'; +import { useT } from '../i18n/strings'; const Topbar: React.FC = ({ projectName, savedStatus, onUndo, onRedo, onThemeToggle, theme, onOpenSettings, onOpenLeftDrawer, onOpenRightDrawer, unit = 'mm', onUnitChange, onNavigateBack, }) => { + const t = useT(); + const uiMode = useUIMode(); return ( @@ -38,8 +41,8 @@ const Topbar: React.FC = ({