diff --git a/frontend/src/components/DashboardGrid.svelte b/frontend/src/components/DashboardGrid.svelte index f2858d9..f43c534 100644 --- a/frontend/src/components/DashboardGrid.svelte +++ b/frontend/src/components/DashboardGrid.svelte @@ -312,7 +312,7 @@
- {($t.dashboard?.showing || "") + {($t.dashboard?.showing ) .replace("{start}", (currentPage * pageSize + 1).toString()) .replace( "{end}", diff --git a/frontend/src/components/EnvSelector.svelte b/frontend/src/components/EnvSelector.svelte index 6da3352..10cc974 100644 --- a/frontend/src/components/EnvSelector.svelte +++ b/frontend/src/components/EnvSelector.svelte @@ -49,7 +49,7 @@ value={selectedId} on:change={handleSelect} > - + {#each environments as env} {/each} diff --git a/frontend/src/components/MappingTable.svelte b/frontend/src/components/MappingTable.svelte index 436fc5c..736ce3f 100644 --- a/frontend/src/components/MappingTable.svelte +++ b/frontend/src/components/MappingTable.svelte @@ -11,6 +11,7 @@ - +
- +
- - + +
- +
- - + +
diff --git a/frontend/src/components/tools/ConnectionList.svelte b/frontend/src/components/tools/ConnectionList.svelte index c38d33b..d8072ae 100644 --- a/frontend/src/components/tools/ConnectionList.svelte +++ b/frontend/src/components/tools/ConnectionList.svelte @@ -28,7 +28,7 @@ try { connections = await getConnections(); } catch (e) { - addToast($t.connections?.fetch_failed || 'Failed to fetch connections', 'error'); + addToast($t.connections?.fetch_failed, 'error'); } finally { isLoading = false; } @@ -40,11 +40,11 @@ // @PRE: id is provided and user confirms deletion. // @POST: Connection is deleted from backend and list is reloaded. async function handleDelete(id) { - if (!confirm($t.connections?.delete_confirm || 'Are you sure you want to delete this connection?')) return; + if (!confirm($t.connections?.delete_confirm)) return; try { await deleteConnection(id); - addToast($t.connections?.deleted_success || 'Connection deleted', 'success'); + addToast($t.connections?.deleted_success, 'success'); await fetchConnections(); } catch (e) { addToast(e.message, 'error'); @@ -59,12 +59,12 @@ - +
    {#if isLoading}
  • {$t.common.loading}
  • {:else if connections.length === 0} -
  • {$t.connections?.no_saved || "No connections saved yet."}
  • +
  • {$t.connections?.no_saved}
  • {:else} {#each connections as conn}
  • @@ -77,7 +77,7 @@ size="sm" on:click={() => handleDelete(conn.id)} > - {$t.connections?.delete || "Delete"} + {$t.connections?.delete}
  • {/each} diff --git a/frontend/src/components/tools/DebugTool.svelte b/frontend/src/components/tools/DebugTool.svelte index a4664da..7f13fb0 100644 --- a/frontend/src/components/tools/DebugTool.svelte +++ b/frontend/src/components/tools/DebugTool.svelte @@ -36,7 +36,7 @@ try { envs = await api.getEnvironmentsList(); } catch (e) { - addToast($t.debug?.fetch_env_failed || 'Failed to fetch environments', 'error'); + addToast($t.debug?.fetch_env_failed, 'error'); } } // [/DEF:fetchEnvironments:Function] @@ -55,7 +55,7 @@ let params = { action }; if (action === 'test-db-api') { if (!sourceEnv || !targetEnv) { - addToast($t.debug?.source_target_required || 'Source and Target environments are required', 'warning'); + addToast($t.debug?.source_target_required, 'warning'); isRunning = false; return; } @@ -65,7 +65,7 @@ params.target_env = tEnv.name; } else { if (!selectedEnv || !datasetId) { - addToast($t.debug?.env_dataset_required || 'Environment and Dataset ID are required', 'warning'); + addToast($t.debug?.env_dataset_required, 'warning'); isRunning = false; return; } @@ -102,11 +102,11 @@ clearInterval(pollInterval); isRunning = false; results = task.result; - addToast($t.debug?.completed || 'Debug task completed', 'success'); + addToast($t.debug?.completed, 'success'); } else if (task.status === 'FAILED') { clearInterval(pollInterval); isRunning = false; - addToast($t.debug?.failed || 'Debug task failed', 'error'); + addToast($t.debug?.failed, 'error'); } } catch (e) { clearInterval(pollInterval); @@ -121,31 +121,31 @@
    -

    {$t.debug?.title || 'System Diagnostics'}

    +

    {$t.debug?.title}

    - +
    {#if action === 'test-db-api'}
    - +
    - + - + {#each envs as env} {/each}
    - +
    @@ -172,7 +172,7 @@
    @@ -180,7 +180,7 @@ {#if results}
    -

    {$t.debug?.output || 'Debug Output'}

    +

    {$t.debug?.output}

    {JSON.stringify(results, null, 2)}
    diff --git a/frontend/src/components/tools/MapperTool.svelte b/frontend/src/components/tools/MapperTool.svelte index 509a5a9..7c26a05 100644 --- a/frontend/src/components/tools/MapperTool.svelte +++ b/frontend/src/components/tools/MapperTool.svelte @@ -106,7 +106,7 @@ const activeProvider = providers.find(p => p.is_active); if (!activeProvider) { - addToast($t.mapper?.errors?.no_active_llm_provider || 'No active LLM provider found', 'error'); + addToast($t.mapper?.errors?.no_active_llm_provider, 'error'); return; } @@ -117,9 +117,9 @@ }); selectedTask.set(task); - addToast($t.mapper?.success?.docs_started || 'Documentation generation started', 'success'); + addToast($t.mapper?.success?.docs_started, 'success'); } catch (e) { - addToast(e.message || $t.mapper?.errors?.docs_start_failed || 'Failed to start documentation generation', 'error'); + addToast(e.message || $t.mapper?.errors?.docs_start_failed, 'error'); } finally { isGeneratingDocs = false; } @@ -130,9 +130,9 @@ try { await api.put(`/mappings/datasets/${datasetId}/metadata`, doc); generatedDoc = null; - addToast($t.mapper?.success?.docs_applied || 'Documentation applied successfully', 'success'); + addToast($t.mapper?.success?.docs_applied, 'success'); } catch (err) { - addToast(err.message || $t.mapper?.errors?.docs_apply_failed || 'Failed to apply documentation', 'error'); + addToast(err.message || $t.mapper?.errors?.docs_apply_failed, 'error'); } } @@ -212,7 +212,7 @@ label={$t.mapper.excel_path} type="text" bind:value={excelPath} - placeholder={$t.mapper?.excel_placeholder || "/path/to/mapping.xlsx"} + placeholder={$t.mapper?.excel_placeholder} />
    {/if} @@ -224,9 +224,9 @@ disabled={isGeneratingDocs || isRunning} > {#if isGeneratingDocs} - {$t.mapper?.generating || "Generating..."} + {$t.mapper?.generating} {:else} - {$t.datasets?.generate_docs || "Generate Docs"} + {$t.datasets?.generate_docs} {/if}
    @@ -501,13 +501,13 @@
    Conversations{$t.assistant?.conversations}
    @@ -518,7 +518,7 @@ : 'border-slate-300 bg-white text-slate-700 hover:bg-slate-100'}" on:click={() => setConversationFilter("active")} > - Active ({activeConversationsTotal}) + {$t.assistant?.active} ({activeConversationsTotal})
    @@ -560,7 +560,7 @@ class="rounded-lg border border-slate-300 px-2.5 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-100" on:click={() => loadConversations(false)} > - More + {$t.assistant?.more} {/if}
    @@ -575,24 +575,24 @@
    - Loading older messages... + {$t.assistant?.loading_older}
    {/if} {#if loadingHistory}
    - {$t.assistant?.loading_history || "Loading history..."} + {$t.assistant?.loading_history}
    {:else if messages.length === 0}
    - {$t.assistant?.try_commands || "Try commands:"} + {$t.assistant?.try_commands}
    -
    • сделай ветку feature/new-dashboard для дашборда 42
    -
    • запусти миграцию с dev на prod для дашборда 42
    -
    • проверь статус задачи task-123
    +
    • {$t.assistant?.sample_command_branch}
    +
    • {$t.assistant?.sample_command_migration}
    +
    • {$t.assistant?.sample_command_status}
    {/if} @@ -608,7 +608,7 @@ - {message.role === "user" ? "You" : "Assistant"} + {message.role === "user" ? $t.assistant?.you : $t.assistant?.assistant} {#if message.state} task_id: {message.task_id}{$t.assistant?.task_id}: {message.task_id}
    {/if} @@ -668,11 +668,11 @@ - Assistant + {$t.assistant?.assistant}
- {$t.assistant?.thinking || "Думаю"} + {$t.assistant?.thinking} @@ -687,7 +687,7 @@ @@ -696,7 +696,7 @@ on:click={handleSend} disabled={loading || !input.trim()} > - {loading ? "..." : $t.assistant?.send || "Send"} + {loading ? "..." : $t.assistant?.send}
diff --git a/frontend/src/lib/components/layout/Breadcrumbs.svelte b/frontend/src/lib/components/layout/Breadcrumbs.svelte index c67cd20..e0f4604 100644 --- a/frontend/src/lib/components/layout/Breadcrumbs.svelte +++ b/frontend/src/lib/components/layout/Breadcrumbs.svelte @@ -30,7 +30,7 @@ */ function getBreadcrumbs(pathname, maxVisible = 3) { const segments = pathname.split("/").filter(Boolean); - const allItems = [{ label: $t.nav?.home || "Home", path: "/" }]; + const allItems = [{ label: $t.nav?.home , path: "/" }]; let currentPath = ""; segments.forEach((segment, index) => { @@ -136,7 +136,7 @@