diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml index 079a776d..2b254a20 100644 --- a/i18n/en_US.yaml +++ b/i18n/en_US.yaml @@ -638,7 +638,7 @@ ui: msg: empty: Email cannot be empty. change_email: - page_title: Welcome to Answer + page_title: Welcome to {{site_name}} btn_cancel: Cancel btn_update: Update email address send_success: >- @@ -838,7 +838,7 @@ ui: modal_confirm: title: Error... account_result: - page_title: Welcome to Answer + page_title: Welcome to {{site_name}} success: Your new account is confirmed; you will be redirected to the home page. link: Continue to homepage invalid: >- diff --git a/ui/src/pages/Users/ActivationResult/index.tsx b/ui/src/pages/Users/ActivationResult/index.tsx index 77cdd52b..b62e2af4 100644 --- a/ui/src/pages/Users/ActivationResult/index.tsx +++ b/ui/src/pages/Users/ActivationResult/index.tsx @@ -3,10 +3,12 @@ import { Container, Row, Col } from 'react-bootstrap'; import { Link, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; +import { siteInfoStore } from '@/stores'; import { usePageTags } from '@/hooks'; const Index: FC = () => { const { t } = useTranslation('translation', { keyPrefix: 'account_result' }); + const siteName = siteInfoStore((state) => state.siteInfo.name); const location = useLocation(); usePageTags({ title: t('account_activation', { keyPrefix: 'page_title' }), @@ -15,7 +17,9 @@ const Index: FC = () => { -

{t('page_title')}

+

+ {t('page_title', { site_name: siteName })} +

{location.pathname?.includes('success') && ( <>

{t('success')}

diff --git a/ui/src/pages/Users/ChangeEmail/index.tsx b/ui/src/pages/Users/ChangeEmail/index.tsx index 33fcd8d3..225c7f6c 100644 --- a/ui/src/pages/Users/ChangeEmail/index.tsx +++ b/ui/src/pages/Users/ChangeEmail/index.tsx @@ -2,18 +2,22 @@ import { FC, memo } from 'react'; import { Container, Col } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; +import { siteInfoStore } from '@/stores'; import { usePageTags } from '@/hooks'; import SendEmail from './components/sendEmail'; const Index: FC = () => { const { t } = useTranslation('translation', { keyPrefix: 'change_email' }); + const siteName = siteInfoStore((state) => state.siteInfo.name); usePageTags({ title: t('change_email', { keyPrefix: 'page_title' }), }); return ( -

{t('page_title')}

+

+ {t('page_title', { site_name: siteName })} +

diff --git a/ui/src/pages/Users/ConfirmNewEmail/index.tsx b/ui/src/pages/Users/ConfirmNewEmail/index.tsx index c30cd801..16d09c9c 100644 --- a/ui/src/pages/Users/ConfirmNewEmail/index.tsx +++ b/ui/src/pages/Users/ConfirmNewEmail/index.tsx @@ -4,7 +4,7 @@ import { Link, useSearchParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { usePageTags } from '@/hooks'; -import { loggedUserInfoStore } from '@/stores'; +import { loggedUserInfoStore, siteInfoStore } from '@/stores'; import { changeEmailVerify, getLoggedUserInfo } from '@/services'; const Index: FC = () => { @@ -13,6 +13,7 @@ const Index: FC = () => { const [step, setStep] = useState('loading'); const updateUser = loggedUserInfoStore((state) => state.update); + const siteName = siteInfoStore((state) => state.siteInfo.name); useEffect(() => { const code = searchParams.get('code'); @@ -38,7 +39,9 @@ const Index: FC = () => { -

{t('page_title')}

+

+ {t('page_title', { site_name: siteName })} +

{step === 'success' && ( <>

{t('confirm_new_email')}