Skip to content

Commit eac5c4e

Browse files
committed
Setup for translation
1 parent a45bb78 commit eac5c4e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/components/Banners/ContributorsQuizBanner.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { useTranslation } from "next-i18next"
2+
13
import { cn } from "@/lib/utils/cn"
24

35
import { TwImage } from "../Image"
@@ -11,6 +13,7 @@ function ContributorsQuizBanner({
1113
className,
1214
...props
1315
}: React.HTMLAttributes<HTMLDivElement>) {
16+
const { t } = useTranslation("common")
1417
return (
1518
<aside
1619
className={cn(
@@ -40,15 +43,14 @@ function ContributorsQuizBanner({
4043
className={cn("flex-[1_1_50%]", "gap-8 py-8 ps-8", "pe-8 lg:pe-0")}
4144
>
4245
<Stack>
43-
<h2>Unsure where to start?</h2>
46+
<h2>{t("contributor-quiz-banner-title")}</h2>
4447
<p className="text-lg text-body">
45-
Take a quick quiz and find out how you can contribute on
46-
ethereum.org.
48+
{t("contributor-quiz-banner-description")}
4749
</p>
4850
</Stack>
4951
<div>
5052
<ButtonLink href="https://ethdotorg.typeform.com/contributor">
51-
Take a quiz
53+
{t("contributor-quiz-banner-button")}
5254
</ButtonLink>
5355
</div>
5456
</Stack>

src/intl/en/common.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,5 +441,8 @@
441441
"withdrawals": "Staking withdrawals",
442442
"wrapped-ether": "Wrapped Ether",
443443
"yes": "Yes",
444-
"zero-knowledge-proofs": "Zero-knowledge proofs"
444+
"zero-knowledge-proofs": "Zero-knowledge proofs",
445+
"contributor-quiz-banner-title": "Unsure where to start?",
446+
"contributor-quiz-banner-description": "Take a quick quiz and find out how you can contribute on ethereum.org.",
447+
"contributor-quiz-banner-button": "Take a quiz"
445448
}

0 commit comments

Comments
 (0)