Skip to content

Commit 80a0e46

Browse files
committed
added internationalization to features section
1 parent d46fd24 commit 80a0e46

File tree

3 files changed

+64
-17
lines changed

3 files changed

+64
-17
lines changed

src/components/sections/features.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,95 @@
11
import { LanguagesIcon } from "lucide-react";
22
import { BrandIcons } from "../shared/brand-icons";
33
import { Card } from "../ui/card";
4+
import { getScopedI18n } from "~/locales/server";
5+
6+
export default async function Features() {
7+
const scopedT = await getScopedI18n("features");
8+
const scopedTlibs = await getScopedI18n("features.libs");
49

5-
export default function Features() {
610
return (
711
<section>
8-
<div className="container space-y-6 rounded-md bg-secondary py-14 lg:py-24 ">
12+
<div className="container space-y-6 rounded-md bg-secondary py-14 lg:py-24">
913
<div className="mx-auto flex max-w-[58rem] flex-col items-center space-y-4 text-center">
10-
<h2 className="font-heading text-4xl md:text-6xl">Features</h2>
14+
<h2 className="font-heading text-4xl md:text-6xl">
15+
{scopedT("top")}
16+
</h2>
1117
<p className="max-w-[85%] text-balance leading-normal text-primary/70 sm:text-lg sm:leading-7">
12-
This template comes with features like Authentication, API routes,
13-
File uploading and more in Next.js App dir.
18+
{scopedT("details")}
1419
</p>
1520
</div>
1621
<div className="mx-auto grid justify-center gap-4 text-center sm:grid-cols-2 md:max-w-[64rem] md:grid-cols-3">
1722
<Card className="flex h-[160px] flex-col justify-between rounded-md p-6">
1823
<BrandIcons.nextjs />
1924
<p className="text-balance text-sm text-muted-foreground">
20-
App dir, Routing, Layouts, API routes, Server Components, Server
21-
actions.
25+
{scopedTlibs("nextjs")}
2226
</p>
2327
</Card>
2428
<Card className="flex h-[160px] flex-col justify-between rounded-md p-6">
2529
<BrandIcons.shadcnUI />
2630

2731
<p className="text-balance text-sm text-muted-foreground">
28-
UI components built using Radix UI and styled with Tailwind CSS.
32+
{scopedTlibs("tailwindcss")}
2933
</p>
3034
</Card>
3135
<Card className="flex h-[160px] flex-col justify-between rounded-md p-6">
3236
<BrandIcons.prisma />
3337

3438
<p className="text-balance text-sm text-muted-foreground">
35-
Using Postgres with Prisma ORM, hosted on Vercel Postgres.
39+
{scopedTlibs("postgres")}
3640
</p>
3741
</Card>
3842
<Card className="flex h-[160px] flex-col justify-between rounded-md p-6">
3943
<BrandIcons.luciaAuth />
4044

4145
<p className="text-balance text-sm text-muted-foreground">
42-
Authentication and Authorization using LuciaAuth v3.
46+
{scopedTlibs("lucia")}
4347
</p>
4448
</Card>
4549
<Card className="flex h-[160px] flex-col justify-between rounded-md p-6">
4650
<BrandIcons.uploadthing />
4751

4852
<p className="text-balance text-sm text-muted-foreground">
49-
Upload and preview files effortlessly with UploadThing.
53+
{scopedTlibs("uploadthing")}
5054
</p>
5155
</Card>
5256
<Card className="flex h-[160px] flex-col justify-between p-6">
5357
<BrandIcons.resend />
5458

5559
<p className="text-balance text-sm text-muted-foreground">
56-
Create emails using React Email and Send with Resend.
60+
{scopedTlibs("reactEmail")}
5761
</p>
5862
</Card>
5963
<Card className="flex h-[160px] flex-col justify-between p-6">
6064
<LanguagesIcon className="mx-auto h-12 w-12 fill-current" />
6165

6266
<p className="text-balance text-sm text-muted-foreground">
63-
Internationalization support with type-safe Next-International.
67+
{scopedTlibs("internationalization")}
6468
</p>
6569
</Card>
6670
<Card className="flex h-[160px] flex-col justify-between p-6">
6771
<BrandIcons.stripe />
6872

6973
<p className="text-balance text-sm text-muted-foreground">
70-
Receive and process payments with Stripe.
74+
{scopedTlibs("stripe")}
7175
</p>
7276
</Card>
7377
<Card className="flex h-[160px] flex-col justify-between p-6">
7478
<BrandIcons.vercel />
7579

7680
<p className="text-balance text-sm text-muted-foreground">
77-
Production and Preview deployments with Vercel.
81+
{scopedTlibs("vercel")}
7882
</p>
7983
</Card>
8084
</div>
8185
<div className="mx-auto text-center md:max-w-[58rem]">
8286
<p className="leading-normal text-primary/70 sm:text-lg sm:leading-7">
83-
ChadNext also includes Changelog & About page built using{" "}
87+
{scopedT('aboutMd')}
8488
<a
8589
href="https://velite.js.org/"
8690
target="_blank"
8791
rel="noopener noreferrer"
88-
className=" underline underline-offset-4"
92+
className="underline underline-offset-4"
8993
>
9094
Velite
9195
</a>{" "}

src/locales/en.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@ export default {
1313
tools: "Built using Great Tools",
1414
on: "on",
1515
},
16+
features: {
17+
top: "Features",
18+
details:
19+
"This template comes with features like Authentication, API routes, File uploading and more in Next.js App dir.",
20+
libs: {
21+
nextjs:
22+
"App dir, Routing, Layouts, API routes, Server Components, Server actions.",
23+
tailwindcss: "UI components built using Radix UI and styled with Tailwind CSS.",
24+
postgres: "Using Postgres with Prisma ORM, hosted on Vercel Postgres.",
25+
lucia: "Authentication and Authorization using LuciaAuth v3.",
26+
uploadthing: "Upload and preview files effortlessly with UploadThing.",
27+
reactEmail: "Create emails using React Email and Send with Resend.",
28+
internationalization:
29+
"Internationalization support with type-safe Next-International.",
30+
stripe: "Receive and process payments with Stripe.",
31+
vercel: "Production and Preview deployments with Vercel.",
32+
},
33+
aboutMd: "ChadNext also includes Changelog & About page built using."
34+
},
1635
notFound: {
1736
title: "Page Not Found!",
1837
},

src/locales/fr.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ export default {
1313
tools: "Construit à l'aide d'excellents outils",
1414
on: "sur",
1515
},
16+
features: {
17+
top: "Caractéristiques",
18+
details:
19+
"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.",
20+
libs: {
21+
nextjs:
22+
"Répertoire App, routage, mises en page, routes API, composants serveur, actions serveur.",
23+
tailwindcss:
24+
"Composants UI construits avec Radix UI et stylisés avec Tailwind CSS.",
25+
postgres:
26+
"Utilisation de Postgres avec Prisma ORM, hébergé sur Vercel Postgres.",
27+
lucia: "Authentification et autorisation avec LuciaAuth v3.",
28+
uploadthing:
29+
"Téléchargez et prévisualisez des fichiers facilement avec UploadThing.",
30+
reactEmail:
31+
"Créez des e-mails avec React Email et envoyez-les avec Resend.",
32+
internationalization:
33+
"Support d'internationalisation avec Next-International, sécurisé par typage.",
34+
stripe: "Recevez et traitez les paiements avec Stripe.",
35+
vercel: "Déploiements de production et de prévisualisation avec Vercel.",
36+
},
37+
aboutMd:
38+
"ChadNext inclut également une page de journal des modifications et une page À propos, construites avec ",
39+
},
1640
notFound: {
1741
title: "Page non trouvée!",
1842
},

0 commit comments

Comments
 (0)