From d56debaa9f85ce086db9755062041e5f0ebe1369 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 11 Oct 2025 20:46:41 +0300 Subject: [PATCH] feat(website/i18n): use translations in get-started --- apps/website/public/translations/en/translation.json | 9 +++++++++ apps/website/src/i18n.ts | 1 - apps/website/src/pages/GetStarted/get-started.tsx | 11 ++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 apps/website/public/translations/en/translation.json diff --git a/apps/website/public/translations/en/translation.json b/apps/website/public/translations/en/translation.json new file mode 100644 index 000000000..4c459839d --- /dev/null +++ b/apps/website/public/translations/en/translation.json @@ -0,0 +1,9 @@ +{ + "get-started": { + "title": "Get started", + "desktop_title": "Download the desktop application (v{{version}})", + "architecture": "Architecture:", + "older_releases": "See older releases", + "server_title": "Set up a server for access on multiple devices" + } +} diff --git a/apps/website/src/i18n.ts b/apps/website/src/i18n.ts index 4c7095704..bce6a3b65 100644 --- a/apps/website/src/i18n.ts +++ b/apps/website/src/i18n.ts @@ -1,7 +1,6 @@ import { default as i18next } from "i18next"; import HttpApi from 'i18next-http-backend'; -console.log("INIT I18NEXT"); i18next.use(HttpApi) await i18next.init({ debug: true, diff --git a/apps/website/src/pages/GetStarted/get-started.tsx b/apps/website/src/pages/GetStarted/get-started.tsx index 37ad220bd..da19039f4 100644 --- a/apps/website/src/pages/GetStarted/get-started.tsx +++ b/apps/website/src/pages/GetStarted/get-started.tsx @@ -8,6 +8,7 @@ import Icon from "../../components/Icon.js"; import helpIcon from "../../assets/boxicons/bx-help-circle.svg?raw"; import "./get-started.css"; import packageJson from "../../../../../package.json" with { type: "json" }; +import { t } from "../../i18n.js"; export default function DownloadPage() { const [ currentArch, setCurrentArch ] = useState("x64"); @@ -18,13 +19,13 @@ export default function DownloadPage() { setUserPlatform(getPlatform() ?? "windows"); }, []); - usePageTitle("Get started"); + usePageTitle(t("get-started.title")); return ( <> -
+
- Architecture: + {t("get-started.architecture")}
{(["x64", "arm64"] as const).map(arch => ( @@ -45,11 +46,11 @@ export default function DownloadPage() {
-
+
{Object.entries(downloadMatrix.server).map(entry => (