feat(training): add Paraglide i18n to training UI components and wire SegmentationTrainingCard

- Convert TrainingHistory, OcrTrainingCard, SegmentationTrainingCard, and
  TranscriptionBlock "Nur Segmentierung" badge to use Paraglide message keys
- Add availableSegBlocks to TrainingInfoResponse to expose segmentation
  block count in the training info endpoint
- Wire SegmentationTrainingCard into admin/system page below OCR training card
- Update api.ts with availableSegBlocks field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-13 15:14:27 +02:00
parent 4e08d31e01
commit 86e9c05aaf
9 changed files with 144 additions and 25 deletions

View File

@@ -27,6 +27,7 @@ type Props = {
onMoveDown?: () => void;
isFirst?: boolean;
isLast?: boolean;
source?: 'MANUAL' | 'OCR';
};
let {
@@ -48,7 +49,8 @@ let {
onMoveUp,
onMoveDown,
isFirst = false,
isLast = false
isLast = false,
source = 'MANUAL'
}: Props = $props();
let localText = $state(text);
@@ -172,6 +174,11 @@ function handleTextareaMouseUp() {
{label}
</span>
{/if}
{#if (!text || text.trim() === '') && source === 'MANUAL'}
<span class="rounded bg-muted px-1.5 py-0.5 text-xs font-medium text-ink-3"
>{m.transcription_block_segmentation_only()}</span
>
{/if}
</div>
<!-- Textarea -->