mirror of
				https://github.com/ajnart/homarr.git
				synced 2025-10-30 01:56:05 +01:00 
			
		
		
		
	🐛 About page and manage user pages not translated (#1724)
This commit is contained in:
		| @@ -10,7 +10,7 @@ import { | |||||||
|   Stack, |   Stack, | ||||||
|   Table, |   Table, | ||||||
|   Text, |   Text, | ||||||
|   createStyles |   createStyles, | ||||||
| } from '@mantine/core'; | } from '@mantine/core'; | ||||||
| import { | import { | ||||||
|   IconAnchor, |   IconAnchor, | ||||||
| @@ -18,7 +18,7 @@ import { | |||||||
|   IconLanguage, |   IconLanguage, | ||||||
|   IconSchema, |   IconSchema, | ||||||
|   IconVersions, |   IconVersions, | ||||||
|   IconVocabulary |   IconVocabulary, | ||||||
| } from '@tabler/icons-react'; | } from '@tabler/icons-react'; | ||||||
| import { useQuery } from '@tanstack/react-query'; | import { useQuery } from '@tanstack/react-query'; | ||||||
| import { InitOptions } from 'i18next'; | 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( |   const contributors = (await fetch( | ||||||
|     `https://api.github.com/repos/${REPO_URL}/contributors?per_page=100`, |     `https://api.github.com/repos/${REPO_URL}/contributors?per_page=100`, | ||||||
|     { |     { | ||||||
| @@ -272,7 +272,12 @@ export async function getServerSideProps({ locale }: GetServerSidePropsContext) | |||||||
|   return { |   return { | ||||||
|     props: { |     props: { | ||||||
|       contributors, |       contributors, | ||||||
|       ...(await getServerSideTranslations(['layout/manage', 'manage/index'], locale)), |       ...(await getServerSideTranslations( | ||||||
|  |         ['layout/manage', 'manage/index'], | ||||||
|  |         ctx.locale, | ||||||
|  |         ctx.req, | ||||||
|  |         ctx.res | ||||||
|  |       )), | ||||||
|     }, |     }, | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -189,9 +189,10 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { | |||||||
|   const translations = await getServerSideTranslations( |   const translations = await getServerSideTranslations( | ||||||
|     manageNamespaces, |     manageNamespaces, | ||||||
|     ctx.locale, |     ctx.locale, | ||||||
|     undefined, |     ctx.req, | ||||||
|     undefined |     ctx.res | ||||||
|   ); |   ); | ||||||
|  |  | ||||||
|   return { |   return { | ||||||
|     props: { |     props: { | ||||||
|       ...translations, |       ...translations, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user