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/UserDetails.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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

diff --git a/apps/web/components/settings/UserDetails.tsx b/apps/web/components/settings/UserDetails.tsx
index 471a6e09..af6698ad 100644
--- a/apps/web/components/settings/UserDetails.tsx
+++ b/apps/web/components/settings/UserDetails.tsx
@@ -1,24 +1,26 @@
 import { Input } from "@/components/ui/input";
+import { useTranslation } from "@/lib/i18n/server";
 import { api } from "@/server/api/client";
 
 export default async function UserDetails() {
+  const { t } = await useTranslation();
   const whoami = await api.users.whoami();
 
   const details = [
     {
-      label: "Name",
+      label: t("common.name"),
       value: whoami.name ?? undefined,
     },
     {
-      label: "Email",
+      label: t("common.email"),
       value: whoami.email ?? undefined,
     },
   ];
 
   return (
-    <div className="mb-8 flex w-full flex-col sm:flex-row">
+    <div className="flex w-full flex-col sm:flex-row">
       <div className="mb-4 w-full text-lg font-medium sm:w-1/3">
-        Basic Details
+        {t("settings.info.basic_details")}
       </div>
       <div className="w-full">
         {details.map(({ label, value }) => (
-- 
cgit v1.2.3-70-g09d2

