diff --git a/packages/app/src/components/404/index.tsx b/packages/app/src/components/404/index.tsx index e2f828ad9f..7df644bbfe 100644 --- a/packages/app/src/components/404/index.tsx +++ b/packages/app/src/components/404/index.tsx @@ -1,9 +1,10 @@ import { NotFoundTitle, PageContainer } from './styles'; - +import { useTranslation } from 'react-i18next'; export const NotfoundPage = () => { + const { t } = useTranslation(); return ( - 404 - Page Not Found + {t('404 - Page Not Found')} ); }; diff --git a/packages/app/src/components/contact-modal/index.tsx b/packages/app/src/components/contact-modal/index.tsx index a182f3e047..50c1e1b530 100644 --- a/packages/app/src/components/contact-modal/index.tsx +++ b/packages/app/src/components/contact-modal/index.tsx @@ -23,7 +23,7 @@ import { StyledModalFooter, } from './style'; import bg from '@/components/contact-modal/bg.png'; - +import { useTranslation } from 'react-i18next'; const linkList = [ { icon: , @@ -51,20 +51,6 @@ const linkList = [ link: 'https://discord.gg/Arn7TqJBvG', }, ]; -const rightLinkList = [ - { - icon: , - title: 'Official Website ', - subTitle: 'AFFiNE.pro', - link: 'https://affine.pro', - }, - { - icon: , - title: 'AFFiNE Community', - subTitle: 'community.affine.pro', - link: 'https://community.affine.pro', - }, -]; type TransitionsModalProps = { open: boolean; @@ -72,6 +58,21 @@ type TransitionsModalProps = { }; export const ContactModal = ({ open, onClose }: TransitionsModalProps) => { + const { t } = useTranslation(); + const rightLinkList = [ + { + icon: , + title: t('Official Website'), + subTitle: 'AFFiNE.pro', + link: 'https://affine.pro', + }, + { + icon: , + title: t('AFFiNE Community'), + subTitle: 'community.affine.pro', + link: 'https://community.affine.pro', + }, + ]; return ( { })} - Get in touch! + {t('Get in touch!')} {linkList.map(({ icon, title, link }) => { return ( @@ -128,7 +129,7 @@ export const ContactModal = ({ open, onClose }: TransitionsModalProps) => { target="_blank" rel="noreferrer" > - How is AFFiNE Alpha different? + {t('How is AFFiNE Alpha different?')}

Copyright © 2022 Toeverything

diff --git a/packages/app/src/components/editor-mode-switch/index.tsx b/packages/app/src/components/editor-mode-switch/index.tsx index 8a219e4757..86a54d8606 100644 --- a/packages/app/src/components/editor-mode-switch/index.tsx +++ b/packages/app/src/components/editor-mode-switch/index.tsx @@ -15,7 +15,7 @@ import { useTheme } from '@/providers/themeProvider'; import { EdgelessIcon, PaperIcon } from './icons'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; import { usePageHelper } from '@/hooks/use-page-helper'; - +import { useTranslation } from 'react-i18next'; const PaperItem = ({ active }: { active?: boolean }) => { const { theme: { @@ -96,7 +96,7 @@ export const EditorModeSwitch = ({ setRadioItemStatus(modifyRadioItemStatus()); // eslint-disable-next-line react-hooks/exhaustive-deps }, [isHover, mode]); - + const { t } = useTranslation(); return ( } active={mode === 'page'} status={radioItemStatus.left} @@ -126,7 +126,7 @@ export const EditorModeSwitch = ({