Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/[locale]/10years/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-10-year-anniversary")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/apps/[application]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale, application } = params

setRequestLocale(locale)

try {
// Fetch apps data using the new data-layer function (already cached)
const appsData = await getAppsData()
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/apps/categories/[catetgoryName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale, catetgoryName } = params

setRequestLocale(locale)

try {
const t = await getTranslations("page-apps")

Expand Down
3 changes: 3 additions & 0 deletions app/[locale]/apps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-apps")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/assets/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-assets")

return await getMetadata({
Expand Down
4 changes: 3 additions & 1 deletion app/[locale]/bug-bounty/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslations } from "next-intl/server"
import { getTranslations, setRequestLocale } from "next-intl/server"

import type { Lang, Params } from "@/lib/types"

Expand Down Expand Up @@ -835,6 +835,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-bug-bounty")

return await getMetadata({
Expand Down
3 changes: 3 additions & 0 deletions app/[locale]/collectibles/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-collectibles")
return await getMetadata({
locale,
Expand Down
5 changes: 4 additions & 1 deletion app/[locale]/community/events/conferences/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslations } from "next-intl/server"
import { getTranslations, setRequestLocale } from "next-intl/server"

import type { Lang, PageParams } from "@/lib/types"

Expand Down Expand Up @@ -152,6 +152,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community-events")

const year = getLocaleYear(locale)
Expand Down
9 changes: 8 additions & 1 deletion app/[locale]/community/events/meetups/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { pick } from "lodash"
import { getMessages, getTranslations } from "next-intl/server"
import {
getMessages,
getTranslations,
setRequestLocale,
} from "next-intl/server"

import type { Lang, PageParams } from "@/lib/types"

Expand Down Expand Up @@ -91,6 +95,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community-events")

const year = getLocaleYear(locale)
Expand Down
9 changes: 8 additions & 1 deletion app/[locale]/community/events/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import {
Plus,
Presentation,
} from "lucide-react"
import { getMessages, getTranslations } from "next-intl/server"
import {
getMessages,
getTranslations,
setRequestLocale,
} from "next-intl/server"

import type { Lang, PageParams, SectionNavDetails } from "@/lib/types"

Expand Down Expand Up @@ -564,6 +568,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community-events")

const year = getLocaleYear(locale)
Expand Down
3 changes: 3 additions & 0 deletions app/[locale]/community/events/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community-events")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/community/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community")
return await getMetadata({
locale,
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/community/support/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-community-support")

return await getMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations(
"page-contributing-translation-program-acknowledgements"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations(NAMESPACE)

return await getMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

return await getMetadata({
locale,
slug: ["translatathon"],
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/developers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-developers-index")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/developers/tools/[tool]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ export async function generateMetadata(props: {
}) {
const { locale, tool: toolKey } = await props.params

setRequestLocale(locale)

const [normalized, toolDescriptions] = await Promise.all([
normalizeDeveloperToolsData(await getDeveloperToolsData()),
getTranslations({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale, category } = params

setRequestLocale(locale)

// Guard against legacy/invalid slugs: the page itself redirects or 404s,
// so skip building metadata from a nonexistent translation key
const data = await getDeveloperToolsData()
Expand Down
8 changes: 7 additions & 1 deletion app/[locale]/developers/tools/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const Page = async (props: { params: Promise<PageParams> }) => {
getDeveloperToolsData(),
getAppPageContributorInfo("developers/tools", locale as Lang),
getTranslations({ locale, namespace: "page-developers-tools" }),
getTranslations({ locale, namespace: "page-developers-tools-descriptions" }),
getTranslations({
locale,
namespace: "page-developers-tools-descriptions",
}),
])

const normalized = normalizeDeveloperToolsData(data)
Expand Down Expand Up @@ -82,6 +85,9 @@ export async function generateMetadata(props: {
}) {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations({
locale,
namespace: "page-developers-tools",
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/developers/tutorials/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-developers-tutorials")

return await getMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ export async function generateMetadata({
}) {
const { locale } = await params

setRequestLocale(locale)

const t = await getTranslations("page-ethereum-history-founder-and-ownership")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/ethereum-vs-bitcoin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ export async function generateMetadata({
}) {
const { locale } = await params

setRequestLocale(locale)

const t = await getTranslations("page-ethereum-vs-bitcoin")

return await getMetadata({
Expand Down
4 changes: 3 additions & 1 deletion app/[locale]/founders/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { Banknote, ChartNoAxesCombined, Handshake } from "lucide-react"
import { getTranslations } from "next-intl/server"
import { getTranslations, setRequestLocale } from "next-intl/server"

import type { Lang, PageParams, SectionNavDetails } from "@/lib/types"

Expand Down Expand Up @@ -446,6 +446,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-founders")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/gas/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-gas")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/get-eth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-get-eth")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/latest/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-latest")

const metadata = await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/layer-2/learn/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-layer-2-learn")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/layer-2/networks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-layer-2-networks")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/layer-2/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-layer-2")

return await getMetadata({
Expand Down
4 changes: 3 additions & 1 deletion app/[locale]/learn/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Fragment } from "react"
import { getTranslations } from "next-intl/server"
import { getTranslations, setRequestLocale } from "next-intl/server"

import type { PageParams, ToCItem } from "@/lib/types"
import type { Lang } from "@/lib/types"
Expand Down Expand Up @@ -467,6 +467,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-learn")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

try {
const t = await getTranslations("page-index")
return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/privacy/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ export async function generateMetadata({
}) {
const { locale } = await params

setRequestLocale(locale)

const t = await getTranslations("page-privacy")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/quizzes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations()

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/reports/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-reports")

return await getMetadata({
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/reports/trillion-dollar-security/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,8 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-trillion-dollar-security")

return await getMetadata({
Expand Down
Loading
Loading