From 929d94f7055080a5622f60a5235a1c0b0338d580 Mon Sep 17 00:00:00 2001 From: Henry Dollman Date: Wed, 30 Oct 2024 12:18:12 -0400 Subject: [PATCH] update translations --- beszel/site/src/components/copy-to-clipboard.tsx | 12 ++++++------ beszel/site/src/components/navbar.tsx | 11 ++++++----- beszel/site/src/components/routes/home.tsx | 4 ++-- beszel/site/src/lib/utils.ts | 4 ++-- beszel/site/src/locales/ar/translation.json | 10 ++++++++-- beszel/site/src/locales/de/translation.json | 9 +++++++-- beszel/site/src/locales/en/translation.json | 8 +++++++- beszel/site/src/locales/es/translation.json | 9 +++++++-- beszel/site/src/locales/fr/translation.json | 7 +++++++ beszel/site/src/locales/ja/translation.json | 10 ++++++++-- beszel/site/src/locales/ru/translation.json | 9 +++++++-- beszel/site/src/locales/vi/translation.json | 10 ++++++++-- beszel/site/src/locales/zh-CN/translation.json | 9 +++++++-- beszel/site/src/locales/zh-HK/translation.json | 9 +++++++-- 14 files changed, 89 insertions(+), 32 deletions(-) diff --git a/beszel/site/src/components/copy-to-clipboard.tsx b/beszel/site/src/components/copy-to-clipboard.tsx index 1f297a8..dbdf759 100644 --- a/beszel/site/src/components/copy-to-clipboard.tsx +++ b/beszel/site/src/components/copy-to-clipboard.tsx @@ -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 ( - + - Could not copy to clipboard - Please copy the text manually. + {t("clipboard.title")} + {t("clipboard.des")} -

- Clipboard API requires a secure context (https, localhost, or *.localhost) -

) diff --git a/beszel/site/src/components/navbar.tsx b/beszel/site/src/components/navbar.tsx index 4f08491..47299d3 100644 --- a/beszel/site/src/components/navbar.tsx +++ b/beszel/site/src/components/navbar.tsx @@ -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 (
- + - +
@@ -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() { > - Search - Search + {t("search")} + {t("search")} {isMac ? "⌘" : "Ctrl"} K diff --git a/beszel/site/src/components/routes/home.tsx b/beszel/site/src/components/routes/home.tsx index 0b0284c..f716259 100644 --- a/beszel/site/src/components/routes/home.tsx +++ b/beszel/site/src/components/routes/home.tsx @@ -100,10 +100,10 @@ export default function () { )} -
+
{t("all_systems")} - {t("home.subtitle_1")} + {t("home.subtitle")}