diff --git a/apps/website/src/app/dashboard/servers/[guildId]/InviteBotPage.tsx b/apps/website/src/app/dashboard/servers/[guildId]/InviteBotPage.tsx
index 2ad11e341..d36f471a0 100644
--- a/apps/website/src/app/dashboard/servers/[guildId]/InviteBotPage.tsx
+++ b/apps/website/src/app/dashboard/servers/[guildId]/InviteBotPage.tsx
@@ -9,6 +9,7 @@ import { LinkUnderlined } from "@mc/ui/LinkUnderlined";
import type { DashboardGuildParams } from "./layout";
import { BotIcon } from "~/app/components/BotIcon";
import { DiscordIcon } from "~/app/components/DiscordIcon";
+import { useTranslation } from "~/i18n/client";
import { Routes } from "~/other/routes";
import { api } from "~/trpc/react";
import { MenuButton } from "../../Menu";
@@ -28,6 +29,8 @@ export function InviteBotPage() {
return () => clearTimeout(timeoutId);
}, [copySuccess]);
+ const [t] = useTranslation();
+
const inviteLink = Routes.Invite(guildId);
const copyLink = async () => {
try {
@@ -52,30 +55,30 @@ export function InviteBotPage() {
- Let's setup the bot!
+ {t("pages.dashboard.servers.inviteBotPage.title")}
- Add Member counter to {guild?.name ?? "Unknown server"} and enjoy
- realtime counters.
+ {t("pages.dashboard.servers.inviteBotPage.subtitle", {
+ serverName: guild?.name ?? t("common.unknownServer"),
+ })}
{userPermissions.canInviteBot ? (
) : (
<>
- You don't have enough permissions to add the bot.
-
- Please ask an administrator or someone with Manage Server
- permission to add this bot.
+ {t("pages.dashboard.servers.inviteBotPage.noPermission")}
{clipboardFailed ? (
- Use or share this link to add the bot
+ {t("pages.dashboard.servers.inviteBotPage.useOrShareLink")}
) : (
)}
>
diff --git a/apps/website/src/app/dashboard/servers/[guildId]/page.tsx b/apps/website/src/app/dashboard/servers/[guildId]/page.tsx
index ef4fa566e..42cc27f6e 100644
--- a/apps/website/src/app/dashboard/servers/[guildId]/page.tsx
+++ b/apps/website/src/app/dashboard/servers/[guildId]/page.tsx
@@ -1,5 +1,6 @@
"use client";
+import type { TFunction } from "i18next";
import type { LucideIcon } from "lucide-react";
import {
BlocksIcon,
@@ -11,59 +12,75 @@ import {
import { cn } from "@mc/ui";
import { Card, CardContent, CardHeader } from "@mc/ui/card";
+import { useTranslation } from "~/i18n/client";
import { MenuButton } from "../../Menu";
// TODO actually implement the guides
-const suggestedTopics: {
+const suggestedTopics = (
+ t: TFunction,
+): {
title: string;
description: string;
icon: LucideIcon;
label?: string;
disabled?: boolean;
-}[] = [
+}[] => [
{
icon: ZapIcon,
- title: "Quick-setup",
- description:
- "Quickly create the most common counters in a few clicks. No imagintion or brain required!",
- label: "Hasle free!",
+ title: t("pages.dashboard.servers.suggestedTopics.quickSetup.title"),
+ description: t(
+ "pages.dashboard.servers.suggestedTopics.quickSetup.description",
+ ),
+ label: t("pages.dashboard.servers.suggestedTopics.quickSetup.label"),
},
{
icon: LandPlotIcon,
- title: "Create from scratch",
- description:
- "Learn how to create your first custom counter in a few minutes",
- label: "Be unique!",
+ title: t("pages.dashboard.servers.suggestedTopics.createFromScratch.title"),
+ description: t(
+ "pages.dashboard.servers.suggestedTopics.createFromScratch.description",
+ ),
+ label: t("pages.dashboard.servers.suggestedTopics.createFromScratch.label"),
},
{
icon: BlocksIcon,
- title: "Advanced counters",
- description: "Get the most out of your counters, tailored to your needs",
- label: "Like a pro",
+ title: t("pages.dashboard.servers.suggestedTopics.advancedCounters.title"),
+ description: t(
+ "pages.dashboard.servers.suggestedTopics.advancedCounters.description",
+ ),
+ label: t("pages.dashboard.servers.suggestedTopics.advancedCounters.label"),
},
{
icon: CandlestickChartIcon,
- title: "Query historical statistics",
- description:
- "See how your counters and other common stats have evolved over time",
- label: "Coming Soon™",
+ title: t(
+ "pages.dashboard.servers.suggestedTopics.queryHistoricalStatistics.title",
+ ),
+ description: t(
+ "pages.dashboard.servers.suggestedTopics.queryHistoricalStatistics.description",
+ ),
+ label: t(
+ "pages.dashboard.servers.suggestedTopics.queryHistoricalStatistics.label",
+ ),
disabled: true,
},
];
export default function Page() {
+ const [t] = useTranslation();
+
return (
-
+
- Welcome back!
+
+ {t("pages.dashboard.servers.suggestedTopics.title")}
+
- Here are some suggestions for you
+ {t("pages.dashboard.servers.suggestedTopics.subTitle")}
- {suggestedTopics.map((topic, i) => (
+ {suggestedTopics(t).map((topic, i) => (
diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx
index 4f570f970..292c470b6 100644
--- a/apps/website/src/app/layout.tsx
+++ b/apps/website/src/app/layout.tsx
@@ -2,6 +2,7 @@ import "~/globals.css";
import { Inter } from "next/font/google";
+import { I18nProvider } from "~/i18n/client";
import { TRPCReactProvider } from "~/trpc/react";
import NavBar from "./components/NavBar";
@@ -25,10 +26,12 @@ export default function RootLayout({
className={`${inter.className} antialiasing dark flex min-h-screen flex-col`}
style={{ backgroundColor: "#0c0a09" }}
>
-
-
- {children}
-
+
+
+
+ {children}
+
+