From af9b8c17d0ec5e4df1597f8ead78a5847d3b7bfd Mon Sep 17 00:00:00 2001 From: Anais Saraiva Date: Mon, 21 Sep 2026 16:49:55 +0200 Subject: [PATCH] Update AdminPanel.tsx --- frontend/src/components/AdminPanel.tsx | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/AdminPanel.tsx b/frontend/src/components/AdminPanel.tsx index 30b08cc..f492fce 100644 --- a/frontend/src/components/AdminPanel.tsx +++ b/frontend/src/components/AdminPanel.tsx @@ -54,20 +54,20 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: ( if (pulling || !fullName.trim()) return; setPulling(true); setError(""); - setPullStatus("Contacting Ollama…"); + setPullStatus(t("ollama.contacting")); setPullPct(null); try { await api.ollamaPull(fullName.trim(), (p) => { if (p.error) { setError(p.error); return; } - setPullStatus(p.status || "Pulling…"); + setPullStatus(p.status || t("ollama.pullingSt")); if (p.total && p.completed) setPullPct(Math.min(100, Math.round((p.completed / p.total) * 100))); else setPullPct(null); }); - setPullStatus("Done"); + setPullStatus(t("ollama.doneSt")); setPullPct(100); await refreshInstalled(); } catch (err) { - setError(err instanceof Error ? err.message : "Pull failed"); + setError(err instanceof Error ? err.message : t("ollama.pullFailed")); } finally { setPulling(false); } @@ -78,15 +78,15 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: ( await api.ollamaDelete(name); await refreshInstalled(); } catch (err) { - setError(err instanceof Error ? err.message : "Delete failed"); + setError(err instanceof Error ? err.message : t("admin.deleteFailed")); } } return ( <> - {} : onClose} title="Ollama models" icon={Bot}> + {} : onClose} title={t("ollama.models")} icon={Bot}>

- Download models from the Ollama library to your Ollama host, or remove local ones. Admin only. + {t("ollama.desc")}

{error &&

{error}

} @@ -94,7 +94,7 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: (

- Pulling {pullName} + {t("ollama.pulling", { name: pullName })}

{pullStatus}

{pullPct !== null && ( @@ -107,7 +107,7 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: (
- + setPullName(e.target.value)} @@ -118,18 +118,18 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: (
-

Installed ({installed.length})

+

{t("ollama.installed", { n: installed.length })}

    - {installed.length === 0 &&
  • No local Ollama models yet.
  • } + {installed.length === 0 &&
  • {t("ollama.noneYet")}
  • } {installed.map((m) => (
  • {m.label || m.id}
-

Catalog

+

{t("ollama.catalog")}

    {OLLAMA_CATALOG.map((m) => { const size = sizeOverrides[m.name] ?? (m.sizes.length > 0 ? m.sizes[0]! : ""); @@ -148,12 +148,12 @@ export function OllamaModelsModal({ open, onClose }: { open: boolean; onClose: (
  • {m.name} - {m.desc} + {t(m.catKey)} {m.sizes.length > 0 && ( setSizeOverrides((prev) => ({ ...prev, [m.name]: v }))} align="right"