From d6af6af0b6c47bd67b231f2deb320d972c62c42c Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Thu, 7 Dec 2023 18:14:10 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20About=20page=20and=20manage=20us?= =?UTF-8?q?er=20pages=20not=20translated=20(#1724)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/manage/about.tsx | 13 +++++++++---- src/pages/manage/users/index.tsx | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pages/manage/about.tsx b/src/pages/manage/about.tsx index f800b20ca00..394e07c9214 100644 --- a/src/pages/manage/about.tsx +++ b/src/pages/manage/about.tsx @@ -10,7 +10,7 @@ import { Stack, Table, Text, - createStyles + createStyles, } from '@mantine/core'; import { IconAnchor, @@ -18,7 +18,7 @@ import { IconLanguage, IconSchema, IconVersions, - IconVocabulary + IconVocabulary, } from '@tabler/icons-react'; import { useQuery } from '@tanstack/react-query'; import { InitOptions } from 'i18next'; @@ -262,7 +262,7 @@ export const Page = ({ contributors }: { contributors: Contributors[] }) => { ); }; -export async function getServerSideProps({ locale }: GetServerSidePropsContext) { +export async function getServerSideProps(ctx: GetServerSidePropsContext) { const contributors = (await fetch( `https://api.github.com/repos/${REPO_URL}/contributors?per_page=100`, { @@ -272,7 +272,12 @@ export async function getServerSideProps({ locale }: GetServerSidePropsContext) return { props: { contributors, - ...(await getServerSideTranslations(['layout/manage', 'manage/index'], locale)), + ...(await getServerSideTranslations( + ['layout/manage', 'manage/index'], + ctx.locale, + ctx.req, + ctx.res + )), }, }; } diff --git a/src/pages/manage/users/index.tsx b/src/pages/manage/users/index.tsx index 4a3b3176b9c..8b90a3505c6 100644 --- a/src/pages/manage/users/index.tsx +++ b/src/pages/manage/users/index.tsx @@ -189,9 +189,10 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { const translations = await getServerSideTranslations( manageNamespaces, ctx.locale, - undefined, - undefined + ctx.req, + ctx.res ); + return { props: { ...translations,