Skip to content

Commit c3ed4cc

Browse files
authored
Merge pull request #16083 from ethereum/translatathonUpdates
Translatathon updates
2 parents 3bb2636 + 3c2b711 commit c3ed4cc

File tree

14 files changed

+200
-62
lines changed

14 files changed

+200
-62
lines changed

app/[locale]/apps/[application]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const Page = async ({
275275
{nextApp && (
276276
<LinkBox className="group hidden flex-row items-center rounded-lg p-3 hover:bg-background-highlight sm:flex">
277277
<div className="mr-2 flex flex-col text-right">
278-
<p className="text-sm text-gray-500 text-nowrap">See next</p>
278+
<p className="text-nowrap text-sm text-gray-500">See next</p>
279279
<p className="text-primary group-hover:text-primary-hover">
280280
{nextApp.name}
281281
</p>

public/content/contributing/translation-program/translatathon/details/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ Participants translating any of the eligible projects will earn an equal amounts
6161

6262
Here is a list of all the eligible projects that are part of the 2025 Translatathon:
6363

64-
Ethereum.org
65-
- https://crowdin.com/project/ethereum-org
64+
- [Ethereum.org](https://crowdin.com/project/ethereum-org)
6665

67-
Ethereum.org developer tutorials
68-
- https://crowdin.com/project/33388446abbe9d7aa21e42e49bba7f97
66+
- [Ethereum.org developer tutorials](https://crowdin.com/project/33388446abbe9d7aa21e42e49bba7f97)
6967

7068
More eligible projects will be added soon.
7169

public/content/contributing/translation-program/translatathon/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,28 @@ For more details, [see the full Terms & conditions](/contributing/translation-pr
7373

7474
<StepByStepInstructions />
7575

76+
## Prizes
77+
78+
| Placement | Prize amount |
79+
|-------------------|--------------|
80+
| 1st place | $4000 |
81+
| 2nd place | $2500 |
82+
| 3rd place | $1500 |
83+
| 4th place | $1100 |
84+
| 5th place | $1000 |
85+
| 6th place | $600 |
86+
| 7th place | $550 |
87+
| 8th place | $500 |
88+
| 9th place | $450 |
89+
| 10th place | $400 |
90+
| 11th - 20th place | $240 |
91+
92+
Plus additional prize tiers for **top 50, top 100, top 150**, and participatory prizes for all other eligible participants.
93+
94+
The remaining prizes will be distributed dynamically based on the total number of eligible participants.
95+
96+
All prizes will be paid out in ETH.
97+
98+
<TranslatathonCalendar />
7699

77100
<ApplyNow />

src/components/Hero/ContentHero/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { ReactElement } from "react"
2+
13
import type { CommonHeroProps } from "@/lib/types"
24

35
import Breadcrumbs from "@/components/Breadcrumbs"
@@ -40,6 +42,11 @@ const ContentHero = (props: ContentHeroProps) => {
4042
<Stack className="flex-col gap-4 md:flex-row">
4143
{buttons.map((button, idx) => {
4244
if (!button) return
45+
// If it's a React element, render it directly
46+
if (typeof button === "object" && "type" in button) {
47+
return <div key={idx}>{button as ReactElement}</div>
48+
}
49+
// Otherwise, render as button props
4350
return <CallToAction key={idx} index={idx} {...button} />
4451
})}
4552
</Stack>

src/components/Hero/HubHero/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { ReactElement } from "react"
2+
13
import type { CommonHeroProps } from "@/lib/types"
24

35
import { CallToAction } from "@/components/Hero/CallToAction"
@@ -74,6 +76,13 @@ const HubHero = ({
7476
>
7577
{buttons?.map((button, idx) => {
7678
if (!button) return
79+
80+
// If it's a React element, render it directly
81+
if (typeof button === "object" && "type" in button) {
82+
return <div key={idx}>{button as ReactElement}</div>
83+
}
84+
85+
// Otherwise, render as button props
7786
return <CallToAction key={idx} index={idx} {...button} />
7887
})}
7988
</Stack>

src/components/Translatathon/ApplyNow.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import Callout from "@/components/Callout"
22

3-
import { ButtonLink } from "../ui/buttons/Button"
3+
import { Button } from "../ui/buttons/Button"
44
import { Flex } from "../ui/flex"
55

6-
import { APPLICATION_END_DATE, APPLICATION_URL } from "./constants"
6+
import { APPLICATION_END_DATE } from "./constants"
7+
import PaperformModal from "./PaperformModal"
78

89
import DolphinImage from "@/public/images/translatathon/translatathon_dolphin.png"
910

@@ -23,7 +24,10 @@ export const ApplyNow = () => {
2324
className="flex-1 basis-[416px] items-center text-center"
2425
>
2526
<Flex className="m-auto">
26-
<ButtonLink href={APPLICATION_URL}>Apply now</ButtonLink>
27+
<PaperformModal
28+
trigger={<Button>Apply now</Button>}
29+
title="Apply to Translate"
30+
/>
2731
</Flex>
2832
</Callout>
2933
</div>

src/components/Translatathon/DatesAndTimeline.tsx

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ButtonLink } from "@/components/ui/buttons/Button"
1+
import { Button, ButtonLink } from "@/components/ui/buttons/Button"
22
import { Flex } from "@/components/ui/flex"
33

44
import { cn } from "@/lib/utils/cn"
@@ -10,6 +10,7 @@ import {
1010
APPLICATION_START_DATE,
1111
APPLICATION_URL,
1212
} from "./constants"
13+
import PaperformModal from "./PaperformModal"
1314

1415
export const dates = [
1516
{
@@ -89,7 +90,7 @@ export const DatesAndTimeline = () => {
8990
<Flex className="flex flex-col gap-6">
9091
<Flex
9192
className={cn(
92-
"flex h-8 items-center rounded-full px-4",
93+
"flex min-h-8 w-fit items-center rounded-full px-4 py-2 text-center",
9394
isLive && "text-body-inverse",
9495
isLive ? "bg-primary" : "bg-primary-low-contrast"
9596
)}
@@ -105,19 +106,31 @@ export const DatesAndTimeline = () => {
105106
</Flex>
106107
{date.link && (
107108
<Flex>
108-
<ButtonLink
109-
href={date.link}
110-
className={cn(
111-
"mt-2",
112-
date.link === APPLICATION_URL && !isLive
113-
? "pointer-events-none text-disabled"
114-
: ""
115-
)}
116-
variant="outline"
117-
aria-disabled={date.link === APPLICATION_URL && !isLive}
118-
>
119-
{date.linkText}
120-
</ButtonLink>
109+
{date.link === APPLICATION_URL ? (
110+
<PaperformModal
111+
trigger={
112+
<Button
113+
className={cn(
114+
"mt-2",
115+
!isLive ? "pointer-events-none text-disabled" : ""
116+
)}
117+
variant="outline"
118+
disabled={!isLive}
119+
>
120+
{date.linkText}
121+
</Button>
122+
}
123+
title="Apply to Translate"
124+
/>
125+
) : (
126+
<ButtonLink
127+
href={date.link}
128+
className="mt-2"
129+
variant="outline"
130+
>
131+
{date.linkText}
132+
</ButtonLink>
133+
)}
121134
</Flex>
122135
)}
123136
</Flex>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { ReactNode } from "react"
2+
3+
import { Button } from "@/components/ui/buttons/Button"
4+
5+
import { cn } from "@/lib/utils/cn"
6+
7+
import PaperformModal from "./PaperformModal"
8+
9+
interface PaperformCallToActionProps {
10+
content: ReactNode
11+
variant: "solid" | "outline"
12+
className?: string
13+
}
14+
15+
export const PaperformCallToAction = ({
16+
content,
17+
variant,
18+
className,
19+
}: PaperformCallToActionProps) => {
20+
const buttonProps = {
21+
variant,
22+
isSecondary: variant === "outline",
23+
className: cn("flex-[1] md:flex-[initial]", className),
24+
}
25+
26+
return (
27+
<PaperformModal
28+
trigger={<Button {...buttonProps}>{content}</Button>}
29+
title="Apply to Translate"
30+
/>
31+
)
32+
}
33+
34+
export default PaperformCallToAction
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"use client"
2+
3+
import { useState } from "react"
4+
5+
import {
6+
Dialog,
7+
DialogContent,
8+
DialogHeader,
9+
DialogTitle,
10+
DialogTrigger,
11+
} from "@/components/ui/dialog-modal"
12+
13+
import { PAPERFORM_ID } from "./constants"
14+
15+
interface PaperformModalProps {
16+
trigger: React.ReactNode
17+
title?: string
18+
}
19+
20+
export const PaperformModal = ({
21+
trigger,
22+
title = "Apply to Translate",
23+
}: PaperformModalProps) => {
24+
const [isOpen, setIsOpen] = useState(false)
25+
26+
// Use direct form URL without embed parameters for better scrolling
27+
const paperformUrl = `https://${PAPERFORM_ID}.paperform.co/`
28+
29+
return (
30+
<Dialog open={isOpen} onOpenChange={setIsOpen}>
31+
<DialogTrigger asChild>{trigger}</DialogTrigger>
32+
<DialogContent className="flex h-[90vh] max-w-4xl flex-col p-0">
33+
<DialogHeader className="flex-shrink-0 border-b px-6 py-4">
34+
<DialogTitle>{title}</DialogTitle>
35+
</DialogHeader>
36+
<div className="min-h-0 flex-1">
37+
<iframe
38+
src={paperformUrl}
39+
className="h-full w-full border-0"
40+
title="Translatathon Application Form"
41+
loading="lazy"
42+
allow="camera; microphone; fullscreen; payment"
43+
/>
44+
</div>
45+
</DialogContent>
46+
</Dialog>
47+
)
48+
}
49+
50+
export default PaperformModal

src/components/Translatathon/StepByStepInstructions.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
APPLICATION_START_DATE,
99
APPLICATION_URL,
1010
} from "./constants"
11+
import PaperformModal from "./PaperformModal"
1112

1213
const instructions = [
1314
{
@@ -95,6 +96,13 @@ export const StepByStepInstructions = () => {
9596
<Button variant="outline" disabled>
9697
{instruction.ctaLabel}
9798
</Button>
99+
) : instruction.ctaLink === APPLICATION_URL ? (
100+
<PaperformModal
101+
trigger={
102+
<Button variant="outline">{instruction.ctaLabel}</Button>
103+
}
104+
title="Apply to Translate"
105+
/>
98106
) : (
99107
<ButtonLink href={instruction.ctaLink} variant="outline">
100108
{instruction.ctaLabel}

0 commit comments

Comments
 (0)