From 80a0e4671b3852796dc32a0fc07041dcf73960a2 Mon Sep 17 00:00:00 2001 From: Karthik Rishinarada Date: Sat, 9 Nov 2024 22:41:41 +0530 Subject: [PATCH] added internationalization to features section --- src/components/sections/features.tsx | 38 +++++++++++++++------------- src/locales/en.ts | 19 ++++++++++++++ src/locales/fr.ts | 24 ++++++++++++++++++ 3 files changed, 64 insertions(+), 17 deletions(-) diff --git a/src/components/sections/features.tsx b/src/components/sections/features.tsx index a26b23b..0a891b1 100644 --- a/src/components/sections/features.tsx +++ b/src/components/sections/features.tsx @@ -1,91 +1,95 @@ import { LanguagesIcon } from "lucide-react"; import { BrandIcons } from "../shared/brand-icons"; import { Card } from "../ui/card"; +import { getScopedI18n } from "~/locales/server"; + +export default async function Features() { + const scopedT = await getScopedI18n("features"); + const scopedTlibs = await getScopedI18n("features.libs"); -export default function Features() { return (
-
+
-

Features

+

+ {scopedT("top")} +

- This template comes with features like Authentication, API routes, - File uploading and more in Next.js App dir. + {scopedT("details")}

- App dir, Routing, Layouts, API routes, Server Components, Server - actions. + {scopedTlibs("nextjs")}

- UI components built using Radix UI and styled with Tailwind CSS. + {scopedTlibs("tailwindcss")}

- Using Postgres with Prisma ORM, hosted on Vercel Postgres. + {scopedTlibs("postgres")}

- Authentication and Authorization using LuciaAuth v3. + {scopedTlibs("lucia")}

- Upload and preview files effortlessly with UploadThing. + {scopedTlibs("uploadthing")}

- Create emails using React Email and Send with Resend. + {scopedTlibs("reactEmail")}

- Internationalization support with type-safe Next-International. + {scopedTlibs("internationalization")}

- Receive and process payments with Stripe. + {scopedTlibs("stripe")}

- Production and Preview deployments with Vercel. + {scopedTlibs("vercel")}

- ChadNext also includes Changelog & About page built using{" "} + {scopedT('aboutMd')} Velite {" "} diff --git a/src/locales/en.ts b/src/locales/en.ts index f6a5b35..d306c96 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -13,6 +13,25 @@ export default { tools: "Built using Great Tools", on: "on", }, + features: { + top: "Features", + details: + "This template comes with features like Authentication, API routes, File uploading and more in Next.js App dir.", + libs: { + nextjs: + "App dir, Routing, Layouts, API routes, Server Components, Server actions.", + tailwindcss: "UI components built using Radix UI and styled with Tailwind CSS.", + postgres: "Using Postgres with Prisma ORM, hosted on Vercel Postgres.", + lucia: "Authentication and Authorization using LuciaAuth v3.", + uploadthing: "Upload and preview files effortlessly with UploadThing.", + reactEmail: "Create emails using React Email and Send with Resend.", + internationalization: + "Internationalization support with type-safe Next-International.", + stripe: "Receive and process payments with Stripe.", + vercel: "Production and Preview deployments with Vercel.", + }, + aboutMd: "ChadNext also includes Changelog & About page built using." + }, notFound: { title: "Page Not Found!", }, diff --git a/src/locales/fr.ts b/src/locales/fr.ts index 3590b77..7d873d1 100644 --- a/src/locales/fr.ts +++ b/src/locales/fr.ts @@ -13,6 +13,30 @@ export default { tools: "Construit à l'aide d'excellents outils", on: "sur", }, + features: { + top: "Caractéristiques", + details: + "Cette template comprend des fonctionnalités telles que l'authentification, les routes API, le téléchargement de fichiers et bien plus dans le répertoire App de Next.js.", + libs: { + nextjs: + "Répertoire App, routage, mises en page, routes API, composants serveur, actions serveur.", + tailwindcss: + "Composants UI construits avec Radix UI et stylisés avec Tailwind CSS.", + postgres: + "Utilisation de Postgres avec Prisma ORM, hébergé sur Vercel Postgres.", + lucia: "Authentification et autorisation avec LuciaAuth v3.", + uploadthing: + "Téléchargez et prévisualisez des fichiers facilement avec UploadThing.", + reactEmail: + "Créez des e-mails avec React Email et envoyez-les avec Resend.", + internationalization: + "Support d'internationalisation avec Next-International, sécurisé par typage.", + stripe: "Recevez et traitez les paiements avec Stripe.", + vercel: "Déploiements de production et de prévisualisation avec Vercel.", + }, + aboutMd: + "ChadNext inclut également une page de journal des modifications et une page À propos, construites avec ", + }, notFound: { title: "Page non trouvée!", },