From 4354ee7ba1c6ac9a9567944ae6169b1664e0ea8a Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 17 Nov 2024 00:33:28 +0000
Subject: 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
---
 apps/web/components/settings/sidebar/items.tsx | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

(limited to 'apps/web/components/settings/sidebar/items.tsx')

diff --git a/apps/web/components/settings/sidebar/items.tsx b/apps/web/components/settings/sidebar/items.tsx
index 047ee233..43dfabdd 100644
--- a/apps/web/components/settings/sidebar/items.tsx
+++ b/apps/web/components/settings/sidebar/items.tsx
@@ -1,4 +1,5 @@
 import React from "react";
+import { TFunction } from "i18next";
 import {
   ArrowLeft,
   Download,
@@ -8,38 +9,40 @@ import {
   User,
 } from "lucide-react";
 
-export const settingsSidebarItems: {
+export const settingsSidebarItems = (
+  t: TFunction,
+): {
   name: string;
   icon: JSX.Element;
   path: string;
-}[] = [
+}[] => [
   {
-    name: "Back To App",
+    name: t("settings.back_to_app"),
     icon: <ArrowLeft size={18} />,
     path: "/dashboard/bookmarks",
   },
   {
-    name: "User Info",
+    name: t("settings.info.user_info"),
     icon: <User size={18} />,
     path: "/settings/info",
   },
   {
-    name: "AI Settings",
+    name: t("settings.ai.ai_settings"),
     icon: <Sparkles size={18} />,
     path: "/settings/ai",
   },
   {
-    name: "RSS Subscriptions",
+    name: t("settings.feeds.rss_subscriptions"),
     icon: <Rss size={18} />,
     path: "/settings/feeds",
   },
   {
-    name: "Import / Export",
+    name: t("settings.import.import_export"),
     icon: <Download size={18} />,
     path: "/settings/import",
   },
   {
-    name: "API Keys",
+    name: t("settings.api_keys.api_keys"),
     icon: <KeyRound size={18} />,
     path: "/settings/api-keys",
   },
-- 
cgit v1.2.3-70-g09d2

