mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
feat(website/i18n): use translations in get-started
This commit is contained in:
parent
2c71e995f2
commit
d56debaa9f
9
apps/website/public/translations/en/translation.json
Normal file
9
apps/website/public/translations/en/translation.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
import { default as i18next } from "i18next";
|
import { default as i18next } from "i18next";
|
||||||
import HttpApi from 'i18next-http-backend';
|
import HttpApi from 'i18next-http-backend';
|
||||||
|
|
||||||
console.log("INIT I18NEXT");
|
|
||||||
i18next.use(HttpApi)
|
i18next.use(HttpApi)
|
||||||
await i18next.init({
|
await i18next.init({
|
||||||
debug: true,
|
debug: true,
|
||||||
|
@ -8,6 +8,7 @@ import Icon from "../../components/Icon.js";
|
|||||||
import helpIcon from "../../assets/boxicons/bx-help-circle.svg?raw";
|
import helpIcon from "../../assets/boxicons/bx-help-circle.svg?raw";
|
||||||
import "./get-started.css";
|
import "./get-started.css";
|
||||||
import packageJson from "../../../../../package.json" with { type: "json" };
|
import packageJson from "../../../../../package.json" with { type: "json" };
|
||||||
|
import { t } from "../../i18n.js";
|
||||||
|
|
||||||
export default function DownloadPage() {
|
export default function DownloadPage() {
|
||||||
const [ currentArch, setCurrentArch ] = useState<Architecture>("x64");
|
const [ currentArch, setCurrentArch ] = useState<Architecture>("x64");
|
||||||
@ -18,13 +19,13 @@ export default function DownloadPage() {
|
|||||||
setUserPlatform(getPlatform() ?? "windows");
|
setUserPlatform(getPlatform() ?? "windows");
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
usePageTitle("Get started");
|
usePageTitle(t("get-started.title"));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Section title={`Download the desktop application (v${packageJson.version})`} className="fill accented download-desktop">
|
<Section title={t("get-started.desktop_title", { version: packageJson.version })} className="fill accented download-desktop">
|
||||||
<div className="architecture-switch">
|
<div className="architecture-switch">
|
||||||
<span>Architecture:</span>
|
<span>{t("get-started.architecture")}</span>
|
||||||
|
|
||||||
<div class="toggle-wrapper">
|
<div class="toggle-wrapper">
|
||||||
{(["x64", "arm64"] as const).map(arch => (
|
{(["x64", "arm64"] as const).map(arch => (
|
||||||
@ -45,11 +46,11 @@ export default function DownloadPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="download-footer">
|
<div class="download-footer">
|
||||||
<Link href="https://github.com/TriliumNext/Trilium/releases/" openExternally>See older releases</Link>
|
<Link href="https://github.com/TriliumNext/Trilium/releases/" openExternally>{t("get-started.older_releases")}</Link>
|
||||||
</div>
|
</div>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title="Set up a server for access on multiple devices">
|
<Section title={t("get-started.server_title")}>
|
||||||
<div className="grid-2-cols download-server">
|
<div className="grid-2-cols download-server">
|
||||||
{Object.entries(downloadMatrix.server).map(entry => (
|
{Object.entries(downloadMatrix.server).map(entry => (
|
||||||
<DownloadCard app="server" arch={currentArch} entry={entry} />
|
<DownloadCard app="server" arch={currentArch} entry={entry} />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user