Skip to content

Commit 946ffa1

Browse files
committed
Merge branch 'dev' into roadmap-page
2 parents aab834a + b2f034d commit 946ffa1

File tree

188 files changed

+2379
-1694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+2379
-1694
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12724,6 +12724,15 @@
1272412724
"contributions": [
1272512725
"bug"
1272612726
]
12727+
},
12728+
{
12729+
"login": "microHoffman",
12730+
"name": "microHoffman",
12731+
"avatar_url": "https://avatars.githubusercontent.com/u/61500778?v=4",
12732+
"profile": "http://pwn.xyz",
12733+
"contributions": [
12734+
"bug"
12735+
]
1272712736
}
1272812737
],
1272912738
"contributorsPerLine": 7,

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ src/data/crowdin/bucketsAwaitingReviewReport.csv
6060
# Storybook
6161
build-storybook.log
6262
storybook-static
63+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
19471947
</tr>
19481948
<tr>
19491949
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JJOptimist"><img src="https://avatars.githubusercontent.com/u/86833563?v=4?s=100" width="100px;" alt="JJOptimist"/><br /><sub><b>JJOptimist</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AJJOptimist" title="Bug reports">🐛</a></td>
1950+
<td align="center" valign="top" width="14.28%"><a href="http://pwn.xyz"><img src="https://avatars.githubusercontent.com/u/61500778?v=4?s=100" width="100px;" alt="microHoffman"/><br /><sub><b>microHoffman</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AmicroHoffman" title="Bug reports">🐛</a></td>
19501951
</tr>
19511952
</tbody>
19521953
</table>

app/[locale]/[...slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default async function Page({
6363
lastEditLocaleTimestamp,
6464
isTranslated,
6565
contributors,
66+
timeToRead,
6667
} = await getPageData({
6768
locale,
6869
slug,
@@ -97,8 +98,7 @@ export default async function Page({
9798
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
9899
contentNotTranslated={!isTranslated}
99100
contributors={contributors}
100-
// TODO: Remove this once we have a real timeToRead value
101-
timeToRead={2}
101+
timeToRead={Math.round(timeToRead.minutes)}
102102
>
103103
{content}
104104
</Layout>

app/[locale]/_components/home.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type {
1313
} from "@/lib/types"
1414
import { CommunityEvent } from "@/lib/interfaces"
1515

16+
import BannerNotification from "@/components/Banners/BannerNotification"
1617
import { ChevronNext } from "@/components/Chevron"
1718
import CodeModal from "@/components/CodeModal"
1819
import HomeHero from "@/components/Hero/HomeHero"
@@ -24,7 +25,6 @@ import Calendar from "@/components/icons/calendar.svg"
2425
import CalendarAdd from "@/components/icons/calendar-add.svg"
2526
import { Image } from "@/components/Image"
2627
import MainArticle from "@/components/MainArticle"
27-
import { TranslatathonBanner } from "@/components/Translatathon/TranslatathonBanner"
2828
import {
2929
Accordion,
3030
AccordionContent,
@@ -118,7 +118,18 @@ const HomePage = ({
118118

119119
return (
120120
<MainArticle className="flex w-full flex-col items-center" dir={dir}>
121-
<TranslatathonBanner />
121+
<BannerNotification shouldShow={locale === "en"}>
122+
<p>
123+
Let&apos;s celebrate 10 years of Ethereum! How did ethereum change
124+
your life? -{" "}
125+
<Link
126+
href="https://ethereumstory.paperform.co/"
127+
className="text-white"
128+
>
129+
share your story
130+
</Link>
131+
</p>
132+
</BannerNotification>
122133
<HomeHero heroImg={Hero} className="w-full" />
123134
<div className="w-full space-y-32 px-4 md:mx-6 lg:space-y-48">
124135
<div className="my-20 grid w-full grid-cols-2 gap-x-4 gap-y-8 md:grid-cols-4 md:gap-x-10">
@@ -249,6 +260,11 @@ const HomePage = ({
249260
href="/resources/"
250261
isSecondary
251262
variant="outline"
263+
customEventOptions={{
264+
eventCategory: eventCategory,
265+
eventAction: "ethereum_activity",
266+
eventName: "ethereum_activity",
267+
}}
252268
>
253269
{t("page-index:page-index-activity-action")} <ChevronNext />
254270
</ButtonLink>
@@ -382,7 +398,7 @@ const HomePage = ({
382398
<button
383399
key={title}
384400
className={cn(
385-
"flex flex-col gap-y-0.5 border-t px-6 py-4 hover:bg-background-highlight max-md:hidden",
401+
"flex flex-col gap-y-0.5 border-t px-6 py-4 text-start hover:bg-background-highlight max-md:hidden",
386402
isModalOpen &&
387403
idx === activeCode &&
388404
"bg-background-highlight"
@@ -397,9 +413,7 @@ const HomePage = ({
397413
}}
398414
>
399415
<p className="font-bold">{title}</p>
400-
<p className="text-start text-sm text-body-medium">
401-
{description}
402-
</p>
416+
<p className="text-sm text-body-medium">{description}</p>
403417
</button>
404418
))}
405419
{/* Mobile */}

app/[locale]/assets/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pick from "lodash.pick"
2-
import { getTranslations } from "next-intl/server"
2+
import {
3+
getMessages,
4+
getTranslations,
5+
setRequestLocale,
6+
} from "next-intl/server"
37

48
import { Lang } from "@/lib/types"
59

@@ -10,17 +14,17 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1014

1115
import AssetsPage from "./_components/assets"
1216

13-
import { loadMessages } from "@/i18n/loadMessages"
14-
1517
export default async function Page({
1618
params,
1719
}: {
1820
params: Promise<{ locale: Lang }>
1921
}) {
2022
const { locale } = await params
2123

24+
setRequestLocale(locale)
25+
2226
// Get i18n messages
23-
const allMessages = await loadMessages(locale)
27+
const allMessages = await getMessages({ locale })
2428
const requiredNamespaces = getRequiredNamespacesForPage("/assets")
2529
const messages = pick(allMessages, requiredNamespaces)
2630

app/[locale]/bug-bounty/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pick from "lodash.pick"
2-
import { getTranslations } from "next-intl/server"
2+
import {
3+
getMessages,
4+
getTranslations,
5+
setRequestLocale,
6+
} from "next-intl/server"
37

48
import { type Params } from "@/lib/types"
59

@@ -10,13 +14,13 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1014

1115
import BugBountiesPage from "./_components/bug-bounty"
1216

13-
import { loadMessages } from "@/i18n/loadMessages"
14-
1517
export default async function Page({ params }: { params: Promise<Params> }) {
1618
const { locale } = await params
1719

20+
setRequestLocale(locale)
21+
1822
// Get i18n messages
19-
const allMessages = await loadMessages(locale)
23+
const allMessages = await getMessages({ locale })
2024
const requiredNamespaces = getRequiredNamespacesForPage("/bug-bounty")
2125
const messages = pick(allMessages, requiredNamespaces)
2226

app/[locale]/community/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pick from "lodash.pick"
2-
import { getTranslations } from "next-intl/server"
2+
import {
3+
getMessages,
4+
getTranslations,
5+
setRequestLocale,
6+
} from "next-intl/server"
37

48
import { Lang } from "@/lib/types"
59

@@ -10,17 +14,17 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1014

1115
import CommunityPage from "./_components/community"
1216

13-
import { loadMessages } from "@/i18n/loadMessages"
14-
1517
export default async function Page({
1618
params,
1719
}: {
1820
params: Promise<{ locale: Lang }>
1921
}) {
2022
const { locale } = await params
2123

24+
setRequestLocale(locale)
25+
2226
// Get i18n messages
23-
const allMessages = await loadMessages(locale)
27+
const allMessages = await getMessages({ locale })
2428
const requiredNamespaces = getRequiredNamespacesForPage("/community")
2529
const pickedMessages = pick(allMessages, requiredNamespaces)
2630

app/[locale]/contributing/translation-program/acknowledgements/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pick from "lodash.pick"
2-
import { getTranslations } from "next-intl/server"
2+
import {
3+
getMessages,
4+
getTranslations,
5+
setRequestLocale,
6+
} from "next-intl/server"
37

48
import { Lang } from "@/lib/types"
59

@@ -10,13 +14,13 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1014

1115
import Acknowledgements from "./_components/acknowledgements"
1216

13-
import { loadMessages } from "@/i18n/loadMessages"
14-
1517
const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
1618
const { locale } = await params
1719

20+
setRequestLocale(locale)
21+
1822
// Get i18n messages
19-
const allMessages = await loadMessages(locale)
23+
const allMessages = await getMessages({ locale })
2024
const requiredNamespaces = getRequiredNamespacesForPage(
2125
"/contributing/translation-program/acknowledgements"
2226
)

app/[locale]/contributing/translation-program/contributors/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pick from "lodash.pick"
2-
import { getTranslations } from "next-intl/server"
2+
import {
3+
getMessages,
4+
getTranslations,
5+
setRequestLocale,
6+
} from "next-intl/server"
37

48
import { Lang } from "@/lib/types"
59

@@ -10,13 +14,13 @@ import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1014

1115
import Contributors from "./_components/contributors"
1216

13-
import { loadMessages } from "@/i18n/loadMessages"
14-
1517
const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
1618
const { locale } = await params
1719

20+
setRequestLocale(locale)
21+
1822
// Get i18n messages
19-
const allMessages = await loadMessages(locale)
23+
const allMessages = await getMessages({ locale })
2024
const requiredNamespaces = getRequiredNamespacesForPage(
2125
"/contributing/translation-program/contributors"
2226
)

0 commit comments

Comments
 (0)