diff options
| author | Mohamed Bassem <me@mbassem.com> | 2024-11-17 00:33:28 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-17 00:33:28 +0000 |
| commit | 4354ee7ba1c6ac9a9567944ae6169b1664e0ea8a (patch) | |
| tree | e27c9070930514d77582bae00b3350274116179c /apps/web/components/settings/sidebar/Sidebar.tsx | |
| parent | 9f2c7be23769bb0f4102736a683710b1a1939661 (diff) | |
| download | karakeep-4354ee7ba1c6ac9a9567944ae6169b1664e0ea8a.tar.zst | |
feature: Add i18n support. Fixes #57 (#635)
* feature(web): Add basic scaffolding for i18n
* refactor: Switch most of the app's strings to use i18n strings
* fix: Remove unused i18next-resources-for-ts command
* Add user setting
* More translations
* Drop the german translation for now
Diffstat (limited to 'apps/web/components/settings/sidebar/Sidebar.tsx')
| -rw-r--r-- | apps/web/components/settings/sidebar/Sidebar.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/components/settings/sidebar/Sidebar.tsx b/apps/web/components/settings/sidebar/Sidebar.tsx index 247e0916..a1b61e98 100644 --- a/apps/web/components/settings/sidebar/Sidebar.tsx +++ b/apps/web/components/settings/sidebar/Sidebar.tsx @@ -1,5 +1,6 @@ import { redirect } from "next/navigation"; import SidebarItem from "@/components/shared/sidebar/SidebarItem"; +import { useTranslation } from "@/lib/i18n/server"; import { getServerAuthSession } from "@/server/auth"; import serverConfig from "@hoarder/shared/config"; @@ -7,6 +8,7 @@ import serverConfig from "@hoarder/shared/config"; import { settingsSidebarItems } from "./items"; export default async function Sidebar() { + const { t } = await useTranslation(); const session = await getServerAuthSession(); if (!session) { redirect("/"); @@ -16,7 +18,7 @@ export default async function Sidebar() { <aside className="flex h-[calc(100vh-64px)] w-60 flex-col gap-5 border-r p-4 "> <div> <ul className="space-y-2 text-sm font-medium"> - {settingsSidebarItems.map((item) => ( + {settingsSidebarItems(t).map((item) => ( <SidebarItem key={item.name} logo={item.icon} |
