Skip to content

Commit 447589d

Browse files
authored
Merge pull request #14880 from JoeChenJ/Setup_ContributorsQuizBanner_for_translation
Setup ContributorsQuizBanner for translation
2 parents 26ab113 + 457e614 commit 447589d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/components/Banners/ContributorsQuizBanner.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { Image } from "../Image"
44
import { ButtonLink } from "../ui/buttons/Button"
55
import { Flex, Stack } from "../ui/flex"
66

7+
import useTranslation from "@/hooks/useTranslation"
78
import PeopleLearning from "@/public/images/people-learning.png"
89

910
// TODO: refactor to use CalloutBanner component
1011
function ContributorsQuizBanner({
1112
className,
1213
...props
1314
}: React.HTMLAttributes<HTMLDivElement>) {
15+
const { t } = useTranslation("common")
1416
return (
1517
<aside
1618
className={cn(
@@ -40,15 +42,14 @@ function ContributorsQuizBanner({
4042
className={cn("flex-[1_1_50%]", "gap-8 py-8 ps-8", "pe-8 lg:pe-0")}
4143
>
4244
<Stack>
43-
<h2>Unsure where to start?</h2>
45+
<h2>{t("contributor-quiz-banner-title")}</h2>
4446
<p className="text-lg text-body">
45-
Take a quick quiz and find out how you can contribute on
46-
ethereum.org.
47+
{t("contributor-quiz-banner-description")}
4748
</p>
4849
</Stack>
4950
<div>
5051
<ButtonLink href="https://ethdotorg.typeform.com/contributor">
51-
Take a quiz
52+
{t("contributor-quiz-banner-button")}
5253
</ButtonLink>
5354
</div>
5455
</Stack>

src/intl/en/common.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"content-resources": "Content Resources",
3131
"content-standardization": "Content standardization",
3232
"contributing": "Contributing",
33+
"contributor-quiz-banner-title": "Unsure where to start?",
34+
"contributor-quiz-banner-description": "Take a quick quiz and find out how you can contribute on ethereum.org.",
35+
"contributor-quiz-banner-button": "Take a quiz",
3336
"contributors": "Contributors",
3437
"contributors-thanks": "Everyone who has <a href=\"/contributing\" target=\"_blank\">contributed</a> to this page – thank you!",
3538
"cookie-policy": "Cookie policy",
@@ -429,6 +432,7 @@
429432
"translation-banner-title-new": "Help translate this page",
430433
"translation-banner-title-update": "Help update this page",
431434
"translation-program": "Translation Program",
435+
"translator": "Translator",
432436
"try-using-search": "Try using search to find what you're looking for or",
433437
"tutorials": "Tutorials",
434438
"up": "Up",
@@ -451,6 +455,5 @@
451455
"withdrawals": "Staking withdrawals",
452456
"wrapped-ether": "Wrapped Ether",
453457
"yes": "Yes",
454-
"zero-knowledge-proofs": "Zero-knowledge proofs",
455-
"translator": "Translator"
458+
"zero-knowledge-proofs": "Zero-knowledge proofs"
456459
}

0 commit comments

Comments
 (0)