i18 cleanup

This commit is contained in:
2026-02-25 18:31:50 +03:00
parent dfe7f9ba47
commit 9e57625aa1
48 changed files with 1431 additions and 808 deletions

View File

@@ -313,8 +313,8 @@
class={`text-xs px-2 py-0.5 rounded-full ${isMultimodalModel(provider.default_model) ? "bg-sky-100 text-sky-800" : "bg-amber-100 text-amber-800"}`}
>
{isMultimodalModel(provider.default_model)
? ($t.llm?.multimodal || "Multimodal")
: ($t.llm?.text_only || "Text only")}
? ($t.llm?.multimodal )
: ($t.llm?.text_only )}
</span>
</div>
<div class="text-sm text-gray-500">

View File

@@ -3,6 +3,7 @@
<!-- @PURPOSE: Displays the results of an LLM-based dashboard validation task. -->
<script>
import { t } from '$lib/i18n';
let {
report,
} = $props();
@@ -21,27 +22,27 @@
{#if result}
<div class="bg-white shadow rounded-lg p-6 space-y-6">
<div class="flex items-center justify-between">
<h2 class="text-xl font-bold text-gray-900">Validation Report</h2>
<h2 class="text-xl font-bold text-gray-900">{$t.llm?.validation_report_title}</h2>
<span class={`px-3 py-1 rounded-full text-sm font-medium ${getStatusColor(result.status)}`}>
{result.status}
</span>
</div>
<div class="prose max-w-none">
<h3 class="text-lg font-semibold">Summary</h3>
<h3 class="text-lg font-semibold">{$t.reports?.summary}</h3>
<p>{result.summary}</p>
</div>
{#if result.issues && result.issues.length > 0}
<div class="space-y-4">
<h3 class="text-lg font-semibold">Detected Issues</h3>
<h3 class="text-lg font-semibold">{$t.tasks?.issues}</h3>
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
<table class="min-w-full divide-y divide-gray-300">
<thead class="bg-gray-50">
<tr>
<th class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900">Severity</th>
<th class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Message</th>
<th class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Location</th>
<th class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900">{$t.reports?.severity}</th>
<th class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">{$t.reports?.message}</th>
<th class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">{$t.tasks?.location}</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@@ -53,7 +54,7 @@
</span>
</td>
<td class="px-3 py-4 text-sm text-gray-500">{issue.message}</td>
<td class="px-3 py-4 text-sm text-gray-500">{issue.location || 'N/A'}</td>
<td class="px-3 py-4 text-sm text-gray-500">{issue.location || $t.common?.not_available}</td>
</tr>
{/each}
</tbody>
@@ -64,15 +65,15 @@
{#if result.screenshot_path}
<div class="space-y-4">
<h3 class="text-lg font-semibold">Screenshot</h3>
<img src={`/api/storage/file?path=${encodeURIComponent(result.screenshot_path)}`} alt="Dashboard Screenshot" class="rounded-lg border border-gray-200 shadow-sm max-w-full" />
<h3 class="text-lg font-semibold">{$t.dashboard?.screenshot_strategy}</h3>
<img src={`/api/storage/file?path=${encodeURIComponent(result.screenshot_path)}`} alt={$t.dashboard?.dashboard_validation} class="rounded-lg border border-gray-200 shadow-sm max-w-full" />
</div>
{/if}
</div>
{:else}
<div class="text-center py-12 bg-gray-50 rounded-lg border-2 border-dashed border-gray-300">
<p class="text-gray-500">No validation result available.</p>
<p class="text-gray-500">{$t.llm?.no_validation_result}</p>
</div>
{/if}
<!-- [/DEF:frontend/src/components/llm/ValidationReport.svelte] -->
<!-- [/DEF:frontend/src/components/llm/ValidationReport.svelte] -->