mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
update translations
This commit is contained in:
@@ -2,19 +2,19 @@ import { useEffect, useMemo, useRef } from "react"
|
||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./ui/dialog"
|
||||
import { Textarea } from "./ui/textarea"
|
||||
import { $copyContent } from "@/lib/stores"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
export default function CopyToClipboard({ content }: { content: string }) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<Dialog defaultOpen={true}>
|
||||
<DialogContent className="w-[90%] rounded-lg" style={{ maxWidth: 530 }}>
|
||||
<DialogContent className="w-[90%] rounded-lg md:pt-4" style={{ maxWidth: 530 }}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Could not copy to clipboard</DialogTitle>
|
||||
<DialogDescription>Please copy the text manually.</DialogDescription>
|
||||
<DialogTitle>{t("clipboard.title")}</DialogTitle>
|
||||
<DialogDescription className="hidden xs:block">{t("clipboard.des")}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<CopyTextarea content={content} />
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Clipboard API requires a secure context (https, localhost, or *.localhost)
|
||||
</p>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
|
@@ -28,6 +28,7 @@ import {
|
||||
} from "@/components/ui/dropdown-menu"
|
||||
import { AddSystemButton } from "./add-system"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { TFunction } from "i18next"
|
||||
|
||||
const CommandPalette = lazy(() => import("./command-palette"))
|
||||
|
||||
@@ -38,10 +39,10 @@ export default function Navbar() {
|
||||
return (
|
||||
<div className="flex items-center h-14 md:h-16 bg-card px-4 pr-3 sm:px-6 border bt-0 rounded-md my-4">
|
||||
<Link href="/" aria-label="Home" className={"p-2 pl-0"}>
|
||||
<Logo className="h-[1.15rem] md:h-[1.3em] fill-foreground" />
|
||||
<Logo className="h-[1.15rem] md:h-[1.25em] fill-foreground" />
|
||||
</Link>
|
||||
|
||||
<SearchButton />
|
||||
<SearchButton t={t} />
|
||||
|
||||
<div className={"flex ml-auto items-center"}>
|
||||
<LangToggle />
|
||||
@@ -111,7 +112,7 @@ export default function Navbar() {
|
||||
)
|
||||
}
|
||||
|
||||
function SearchButton() {
|
||||
function SearchButton({ t }: { t: TFunction<"translation", undefined> }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const Kbd = ({ children }: { children: React.ReactNode }) => (
|
||||
@@ -129,8 +130,8 @@ function SearchButton() {
|
||||
>
|
||||
<span className="flex items-center">
|
||||
<SearchIcon className="mr-1.5 h-4 w-4" />
|
||||
Search
|
||||
<span className="sr-only">Search</span>
|
||||
{t("search")}
|
||||
<span className="sr-only">{t("search")}</span>
|
||||
<span className="flex items-center ml-3.5">
|
||||
<Kbd>{isMac ? "⌘" : "Ctrl"}</Kbd>
|
||||
<Kbd>K</Kbd>
|
||||
|
@@ -100,10 +100,10 @@ export default function () {
|
||||
)}
|
||||
<Card>
|
||||
<CardHeader className="pb-5 px-2 sm:px-6 max-sm:pt-5 max-sm:pb-1">
|
||||
<div className="grid md:flex gap-3 w-full items-end">
|
||||
<div className="grid md:flex gap-5 w-full items-end">
|
||||
<div className="px-2 sm:px-1">
|
||||
<CardTitle className="mb-2.5">{t("all_systems")}</CardTitle>
|
||||
<CardDescription>{t("home.subtitle_1")}</CardDescription>
|
||||
<CardDescription>{t("home.subtitle")}</CardDescription>
|
||||
</div>
|
||||
<Input
|
||||
placeholder={t("filter")}
|
||||
|
@@ -9,7 +9,7 @@ import { timeDay, timeHour } from "d3-time"
|
||||
import { useEffect, useState } from "react"
|
||||
import { CpuIcon, HardDriveIcon, MemoryStickIcon, ServerIcon } from "lucide-react"
|
||||
import { EthernetIcon, ThermometerIcon } from "@/components/ui/icons"
|
||||
|
||||
import { t } from "i18next"
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export async function copyToClipboard(content: string) {
|
||||
await navigator.clipboard.writeText(content)
|
||||
toast({
|
||||
duration,
|
||||
description: "Copied to clipboard",
|
||||
description: t("clipboard.copied"),
|
||||
})
|
||||
} catch (e: any) {
|
||||
$copyContent.set(content)
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "تصفية...",
|
||||
"copy": "نسخ",
|
||||
"add": "إضافة",
|
||||
"search": "بحث",
|
||||
"system": "نظام",
|
||||
"systems": "الأنظمة",
|
||||
"cancel": "إلغاء",
|
||||
@@ -10,7 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "التنبيهات النشطة",
|
||||
"active_des": "يتجاوز متوسط {{value}}{{unit}} في آخر {{minutes}} دقيقة",
|
||||
"subtitle_1": "يتم التحديث في الوقت الفعلي. انقر على نظام لعرض المعلومات."
|
||||
"subtitle": "يتم التحديث في الوقت الفعلي. انقر على نظام لعرض المعلومات."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "النظام",
|
||||
@@ -44,7 +45,7 @@
|
||||
"memory_usage_des": "يتم التفعيل عندما يتجاوز استخدام الذاكرة الحد المعين.",
|
||||
"disk_usage": "استخدام القرص",
|
||||
"disk_usage_des": "يتم التفعيل عندما يتجاوز استخدام أي قرص الحد المعين.",
|
||||
"bandwidth": "عرض النطاق",
|
||||
"bandwidth": "رض النطاق",
|
||||
"bandwidth_des": "يتم التفعيل عندما يتجاوز مجموع الرفع/التنزيل الحد المعين.",
|
||||
"temperature": "درجة الحرارة",
|
||||
"temperature_des": "يتم التفعيل عندما يتجاوز أي مستشعر الحد المعين."
|
||||
@@ -173,5 +174,10 @@
|
||||
"usage": "الاستخدام",
|
||||
"disk_usage_of": "استخدام القرص لـ",
|
||||
"throughput_of": "معدل نقل البيانات لـ"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "تم النسخ إلى الحافظة",
|
||||
"title": "نسخ النص",
|
||||
"des": "النسخ التلقائي يتطلب سياقاً آمناً."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Filtern...",
|
||||
"copy": "Kopieren",
|
||||
"add": "Hinzufügen",
|
||||
"search": "Suchen",
|
||||
"system": "System",
|
||||
"systems": "Systeme",
|
||||
"cancel": "Abbrechen",
|
||||
@@ -10,8 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Aktive Warnungen",
|
||||
"active_des": "Überschreitet {{value}}{{unit}} Durchschnitt in den letzten {{minutes}} Minuten",
|
||||
"subtitle_1": "In Echtzeit aktualisiert. Drücken Sie",
|
||||
"subtitle_2": "um die Befehlsübersicht zu öffnen."
|
||||
"subtitle": "Wird in Echtzeit aktualisiert. Klicken Sie auf ein System, um Informationen anzuzeigen."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "System",
|
||||
@@ -190,5 +190,10 @@
|
||||
"command_line_instructions": "Befehlszeilenanweisungen",
|
||||
"command_1": "Wenn Sie das Passwort für Ihr Administratorkonto verloren haben, können Sie es mit dem folgenden Befehl zurücksetzen.",
|
||||
"command_2": "Melden Sie sich dann im Backend an und setzen Sie das Passwort Ihres Benutzerkontos in der Benutzertabelle zurück."
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "In die Zwischenablage kopiert",
|
||||
"title": "Text kopieren",
|
||||
"des": "Automatisches Kopieren erfordert einen sicheren Kontext."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Filter...",
|
||||
"copy": "Copy",
|
||||
"add": "Add",
|
||||
"search": "Search",
|
||||
"system": "System",
|
||||
"systems": "Systems",
|
||||
"cancel": "Cancel",
|
||||
@@ -10,7 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Active Alerts",
|
||||
"active_des": "Exceeds {{value}}{{unit}} average in last {{minutes}} minutes",
|
||||
"subtitle_1": "Updated in real time. Click on a system to view information."
|
||||
"subtitle": "Updated in real time. Click on a system to view information."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "System",
|
||||
@@ -189,5 +190,10 @@
|
||||
"command_line_instructions": "Command line instructions",
|
||||
"command_1": "If you've lost the password to your admin account, you may reset it using the following command.",
|
||||
"command_2": "Then log into the backend and reset your user account password in the users table."
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Copied to clipboard",
|
||||
"title": "Copy text",
|
||||
"des": "Automatic copy requires a secure context."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Filtrar...",
|
||||
"copy": "Copiar",
|
||||
"add": "Agregar",
|
||||
"search": "Buscar",
|
||||
"system": "Sistema",
|
||||
"systems": "Sistemas",
|
||||
"cancel": "Cancelar",
|
||||
@@ -10,8 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Alertas activas",
|
||||
"active_des": "Excede el promedio de {{value}}{{unit}} en los últimos {{minutes}} minutos",
|
||||
"subtitle_1": "Actualizado en tiempo real. Presione",
|
||||
"subtitle_2": "para abrir la paleta de comandos."
|
||||
"subtitle": "Actualizado en tiempo real. Haga clic en un sistema para ver información."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "Sistema",
|
||||
@@ -190,5 +190,10 @@
|
||||
"command_line_instructions": "Instrucciones de línea de comandos",
|
||||
"command_1": "Si ha perdido la contraseña de su cuenta de administrador, puede restablecerla usando el siguiente comando.",
|
||||
"command_2": "Luego inicie sesión en el backend y restablezca la contraseña de su cuenta de usuario en la tabla de usuarios."
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Copiado al portapapeles",
|
||||
"title": "Copiar texto",
|
||||
"des": "La copia automática requiere un contexto seguro."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Filtrer...",
|
||||
"copy": "Copier",
|
||||
"add": "Ajouter",
|
||||
"search": "Rechercher",
|
||||
"system": "Système",
|
||||
"systems": "Systèmes",
|
||||
"cancel": "Annuler",
|
||||
@@ -10,6 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Alertes actives",
|
||||
"active_des": "Dépasse {{value}}{{unit}} en moyenne au cours des {{minutes}} dernières minutes",
|
||||
"subtitle": "Mis à jour en temps réel. Cliquez sur un système pour voir les informations.",
|
||||
"subtitle_1": "Mis à jour en temps réel. Appuyez sur",
|
||||
"subtitle_2": "pour ouvrir la palette de commandes."
|
||||
},
|
||||
@@ -190,5 +192,10 @@
|
||||
"command_line_instructions": "Instructions en ligne de commande",
|
||||
"command_1": "Si vous avez perdu le mot de passe de votre compte administrateur, vous pouvez le réinitialiser en utilisant la commande suivante.",
|
||||
"command_2": "Ensuite, connectez-vous au backend et réinitialisez le mot de passe de votre compte utilisateur dans la table des utilisateurs."
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Copié dans le presse-papiers",
|
||||
"title": "Copier le texte",
|
||||
"des": "La copie automatique nécessite un contexte sécurisé."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "フィルター...",
|
||||
"copy": "コピー",
|
||||
"add": "追加",
|
||||
"search": "検索",
|
||||
"system": "システム",
|
||||
"systems": "システム一覧",
|
||||
"cancel": "キャンセル",
|
||||
@@ -10,7 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "アクティブなアラート",
|
||||
"active_des": "過去{{minutes}}分間の平均が{{value}}{{unit}}を超過",
|
||||
"subtitle_1": "リアルタイムで更新されます。システムをクリックして詳細を表示。"
|
||||
"subtitle": "リアルタイムで更新されます。システムをクリックして情報を表示します。"
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "システム",
|
||||
@@ -165,7 +166,7 @@
|
||||
"bandwidth": "帯域幅",
|
||||
"bandwidth_des": "パブリックインターフェースのネットワークトラフィック",
|
||||
"docker_network_io": "Dockerネットワークl/O",
|
||||
"docker_network_io_des": "Dockerコンテナのネットワークトラフ<EFBFBD><EFBFBD>ック",
|
||||
"docker_network_io_des": "Dockerコンテナのネットワークトラフック",
|
||||
"swap_usage": "スワップ使用率",
|
||||
"swap_des": "システムが使用するスワップ領域",
|
||||
"temperature": "温度",
|
||||
@@ -173,5 +174,10 @@
|
||||
"usage": "使用率",
|
||||
"disk_usage_of": "のディスク使用率",
|
||||
"throughput_of": "のスループット"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "クリップボードにコピーしました",
|
||||
"title": "テキストをコピー",
|
||||
"des": "自動コピーには安全なコンテキストが必要です。"
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Фильтр...",
|
||||
"copy": "Копировать",
|
||||
"add": "Добавить",
|
||||
"search": "Поиск",
|
||||
"system": "Система",
|
||||
"systems": "Системы",
|
||||
"cancel": "Отмена",
|
||||
@@ -10,8 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Активные предупреждения",
|
||||
"active_des": "Превышает {{value}}{{unit}} в среднем за последние {{minutes}} минут",
|
||||
"subtitle_1": "Обновляется в реальном времени. Нажмите",
|
||||
"subtitle_2": "чтобы открыть палитру команд."
|
||||
"subtitle": "Обновляется в реальном времени. Нажмите на систему для просмотра информации."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "Система",
|
||||
@@ -190,5 +190,10 @@
|
||||
"command_line_instructions": "Инструкции по командной строке",
|
||||
"command_1": "Если вы потеряли пароль от своей учетной записи администратора, вы можете сбросить его, используя следующую команду.",
|
||||
"command_2": "Затем войдите в бэкэнд и сбросьте пароль своей учетной записи пользователя в таблице пользователей."
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Скопировано в буфер обмена",
|
||||
"title": "Копировать текст",
|
||||
"des": "Автоматическое копирование требует безопасного контекста."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "Lọc...",
|
||||
"copy": "Sao chép",
|
||||
"add": "Thêm",
|
||||
"search": "Tìm kiếm",
|
||||
"system": "Hệ thống",
|
||||
"systems": "Các hệ thống",
|
||||
"cancel": "Hủy",
|
||||
@@ -10,7 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "Cảnh báo đang hoạt động",
|
||||
"active_des": "Vượt quá {{value}}{{unit}} trung bình trong {{minutes}} phút cuối",
|
||||
"subtitle_1": "Cập nhật theo thời gian thực. Nhấp vào hệ thống để xem thông tin."
|
||||
"subtitle": "Cập nhật theo thời gian thực. Nhấp vào hệ thống để xem thông tin."
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "Hệ thống",
|
||||
@@ -43,7 +44,7 @@
|
||||
"memory_usage": "Sử dụng bộ nhớ",
|
||||
"memory_usage_des": "Kích hoạt khi mức sử dụng bộ nhớ vượt quá ngưỡng.",
|
||||
"disk_usage": "Sử dụng ổ đĩa",
|
||||
"disk_usage_des": "Kích hoạt khi mức sử dụng của bất kỳ ổ đĩa nào vượt quá ngưỡng.",
|
||||
"disk_usage_des": "Kích hoạt khi m<EFBFBD><EFBFBD>c sử dụng của bất kỳ ổ đĩa nào vượt quá ngưỡng.",
|
||||
"bandwidth": "Băng thông",
|
||||
"bandwidth_des": "Kích hoạt khi tổng lưu lượng up/down vượt quá ngưỡng.",
|
||||
"temperature": "Nhiệt độ",
|
||||
@@ -173,5 +174,10 @@
|
||||
"usage": "Sử dụng",
|
||||
"disk_usage_of": "Mức sử dụng ổ đĩa của",
|
||||
"throughput_of": "Thông lượng của"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Đã sao chép vào clipboard",
|
||||
"title": "Sao chép văn bản",
|
||||
"des": "Sao chép tự động yêu cầu ngữ cảnh bảo mật."
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "筛选...",
|
||||
"copy": "复制",
|
||||
"add": "添加",
|
||||
"search": "搜索",
|
||||
"system": "服务器",
|
||||
"systems": "服务器",
|
||||
"cancel": "取消",
|
||||
@@ -10,8 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "活动警报",
|
||||
"active_des": "在过去 {{minutes}} 分钟内超过 {{value}}{{unit}} 平均值",
|
||||
"subtitle_1": "实时更新。按",
|
||||
"subtitle_2": "打开命令面板。"
|
||||
"subtitle": "实时更新。点击系统以查看信息。"
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "服务器",
|
||||
@@ -190,5 +190,10 @@
|
||||
"command_line_instructions": "了解命令行指令",
|
||||
"command_1": "如果您忘记了管理员账户的密码,可以使用以下命令重置。",
|
||||
"command_2": "然后登录到后台,在用户表中重置您的用户账户密码。"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "已复制到剪贴板",
|
||||
"title": "复制文本",
|
||||
"des": "自动复制需要安全上下文。"
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"filter": "篩選...",
|
||||
"copy": "複製",
|
||||
"add": "新增",
|
||||
"search": "搜尋",
|
||||
"system": "伺服器",
|
||||
"systems": "伺服器",
|
||||
"cancel": "取消",
|
||||
@@ -10,8 +11,7 @@
|
||||
"home": {
|
||||
"active_alerts": "活動警報",
|
||||
"active_des": "在過去 {{minutes}} 分鐘內超過 {{value}}{{unit}} 平均值",
|
||||
"subtitle_1": "即時更新。按",
|
||||
"subtitle_2": "打開指令面板。"
|
||||
"subtitle": "即時更新。點擊系統以查看資訊。"
|
||||
},
|
||||
"systems_table": {
|
||||
"system": "伺服器",
|
||||
@@ -190,5 +190,10 @@
|
||||
"command_line_instructions": "了解命令行指令",
|
||||
"command_1": "如果您忘記了管理員賬戶的密碼,可以使用以下命令重置。",
|
||||
"command_2": "然後登入到後台,在用戶表中重置您的用戶賬戶密碼。"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "已複製到剪貼簿",
|
||||
"title": "複製文字",
|
||||
"des": "自動複製需要安全上下文。"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user