i18n: upravené systémové záznamy

This commit is contained in:
VAIO73
2026-09-12 11:36:49 +02:00
parent e61fdbf84f
commit cbc5b9d953
2 changed files with 20 additions and 20 deletions
+6 -6
View File
@@ -29,7 +29,7 @@ import {
} from "lucide-react" } from "lucide-react"
import { useState, useEffect, useMemo } from "react" import { useState, useEffect, useMemo } from "react"
import { API_PORT, fetchApi, getApiUrl, getAuthToken } from "@/lib/api-config" import { API_PORT, fetchApi, getApiUrl, getAuthToken } from "@/lib/api-config"
import { useT } from "@/lib/i18n/provider" import { useI18n } from "@/lib/i18n/provider"
interface Backup { interface Backup {
volid: string volid: string
@@ -89,7 +89,7 @@ interface CombinedLogEntry {
} }
export function SystemLogs() { export function SystemLogs() {
const t = useT() const { language, t } = useI18n()
const [logs, setLogs] = useState<SystemLog[]>([]) const [logs, setLogs] = useState<SystemLog[]>([])
const [backups, setBackups] = useState<Backup[]>([]) const [backups, setBackups] = useState<Backup[]>([])
const [events, setEvents] = useState<Event[]>([]) const [events, setEvents] = useState<Event[]>([])
@@ -607,7 +607,7 @@ export function SystemLogs() {
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="text-2xl font-bold text-foreground"> <div className="text-2xl font-bold text-foreground">
{(logsCounts?.total ?? 0).toLocaleString("fr-FR")} {(logsCounts?.total ?? 0).toLocaleString(language)}
</div> </div>
<p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.selectedRange")}</p> <p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.selectedRange")}</p>
</CardContent> </CardContent>
@@ -619,7 +619,7 @@ export function SystemLogs() {
<XCircle className="h-4 w-4 text-red-500" /> <XCircle className="h-4 w-4 text-red-500" />
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="text-2xl font-bold text-red-500">{(logsCounts?.errors ?? 0).toLocaleString("fr-FR")}</div> <div className="text-2xl font-bold text-red-500">{(logsCounts?.errors ?? 0).toLocaleString(language)}</div>
<p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.requiresAttention")}</p> <p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.requiresAttention")}</p>
</CardContent> </CardContent>
</Card> </Card>
@@ -630,7 +630,7 @@ export function SystemLogs() {
<AlertTriangle className="h-4 w-4 text-yellow-500" /> <AlertTriangle className="h-4 w-4 text-yellow-500" />
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="text-2xl font-bold text-yellow-500">{(logsCounts?.warnings ?? 0).toLocaleString("fr-FR")}</div> <div className="text-2xl font-bold text-yellow-500">{(logsCounts?.warnings ?? 0).toLocaleString(language)}</div>
<p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.monitorClosely")}</p> <p className="text-xs text-muted-foreground mt-2">{t("systemLogs.cards.monitorClosely")}</p>
</CardContent> </CardContent>
</Card> </Card>
@@ -641,7 +641,7 @@ export function SystemLogs() {
<Database className="h-4 w-4 text-blue-500" /> <Database className="h-4 w-4 text-blue-500" />
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="text-2xl font-bold text-blue-500">{backupStats.total.toLocaleString("fr-FR")}</div> <div className="text-2xl font-bold text-blue-500">{backupStats.total.toLocaleString(language)}</div>
<p className="text-xs text-muted-foreground mt-2">{formatBytes(backupStats.totalSize)}</p> <p className="text-xs text-muted-foreground mt-2">{formatBytes(backupStats.totalSize)}</p>
</CardContent> </CardContent>
</Card> </Card>
+14 -14
View File
@@ -37,7 +37,7 @@
"hardware": "Hardvér", "hardware": "Hardvér",
"backup": "Záloha", "backup": "Záloha",
"terminal": "Terminál", "terminal": "Terminál",
"systemLogs": "Systémové logy", "systemLogs": "Systémové záznamy",
"security": "Bezpečnosť", "security": "Bezpečnosť",
"settings": "Nastavenia", "settings": "Nastavenia",
"about": "O projekte", "about": "O projekte",
@@ -3093,15 +3093,15 @@
} }
}, },
"systemLogs": { "systemLogs": {
"title": "Systémové logy a udalosti", "title": "Systémové záznamy a udalosti",
"sections": "Časti", "sections": "Časti",
"loading": { "loading": {
"title": "Načítavam logy…", "title": "Načítavam záznamy…",
"description": "Získavam systémové logy a udalosti" "description": "Získavam systémové záznamy a udalosti"
}, },
"errors": { "errors": {
"connectFailed": "Nepodarilo sa pripojiť k serveru.", "connectFailed": "Nepodarilo sa pripojiť k serveru.",
"loadFailed": "Logy sa nepodarilo načítať. Skúste to znova." "loadFailed": "Záznamy sa nepodarilo načítať. Skúste to znova."
}, },
"cards": { "cards": {
"totalEntries": "Všetky záznamy", "totalEntries": "Všetky záznamy",
@@ -3109,17 +3109,17 @@
"errors": "Chyby", "errors": "Chyby",
"requiresAttention": "Vyžadujú pozornosť", "requiresAttention": "Vyžadujú pozornosť",
"warnings": "Upozornenia", "warnings": "Upozornenia",
"monitorClosely": "Treba ich sledovať", "monitorClosely": "Skontrolujte ich",
"backups": "Zálohy" "backups": "Zálohy"
}, },
"tabs": { "tabs": {
"logs": "Logy", "logs": "Záznamy",
"events": "Udalosti", "events": "Udalosti",
"backups": "Zálohy", "backups": "Zálohy",
"notifications": "Notifikácie" "notifications": "Notifikácie"
}, },
"filters": { "filters": {
"searchPlaceholder": "Hľadať v logoch a udalostiach…", "searchPlaceholder": "Hľadať v záznamoch a udalostiach…",
"timeRange": "Časové obdobie", "timeRange": "Časové obdobie",
"oneDay": "Posledný deň", "oneDay": "Posledný deň",
"threeDays": "Posledné 3 dni", "threeDays": "Posledné 3 dni",
@@ -3147,8 +3147,8 @@
"debug": "Ladenie" "debug": "Ladenie"
}, },
"export": { "export": {
"button": "Exportovať logy", "button": "Exportovať záznamy",
"title": "Export systémových logov a udalostí Proxmoxu", "title": "Export systémových záznamov a udalostí Proxmoxu",
"filtersApplied": "Použité filtre" "filtersApplied": "Použité filtre"
}, },
"fields": { "fields": {
@@ -3181,7 +3181,7 @@
"event": "Udalosť" "event": "Udalosť"
}, },
"empty": { "empty": {
"logs": "Vybraným filtrom nezodpovedajú žiadne logy.", "logs": "Vybraným filtrom nezodpovedajú žiadne záznamy.",
"backups": "Nenašli sa žiadne zálohy.", "backups": "Nenašli sa žiadne zálohy.",
"notifications": "Nenašli sa žiadne notifikácie." "notifications": "Nenašli sa žiadne notifikácie."
}, },
@@ -3192,7 +3192,7 @@
"totalSize": "Celková veľkosť" "totalSize": "Celková veľkosť"
}, },
"modals": { "modals": {
"logTitle": "Podrobnosti logu", "logTitle": "Podrobnosti záznamu",
"logDescription": "Všetky informácie o tomto zázname", "logDescription": "Všetky informácie o tomto zázname",
"eventTitle": "Podrobnosti udalosti", "eventTitle": "Podrobnosti udalosti",
"eventDescription": "Všetky informácie o tejto udalosti", "eventDescription": "Všetky informácie o tejto udalosti",
@@ -3202,8 +3202,8 @@
"notificationDescription": "Všetky informácie o tejto notifikácii" "notificationDescription": "Všetky informácie o tejto notifikácii"
}, },
"download": { "download": {
"taskLog": "Log úlohy Proxmoxu", "taskLog": "Záznam úlohy Proxmoxu",
"completeTaskLog": "Celý log úlohy", "completeTaskLog": "Celý záznam úlohy",
"completeMessage": "Celá správa", "completeMessage": "Celá správa",
"completeMessageButton": "Stiahnuť celú správu" "completeMessageButton": "Stiahnuť celú správu"
} }