diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index 5b4596c3..d7947a0b 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1209,5 +1209,8 @@ "首页内容已更新": "Home page content updated", "关于已更新": "About updated", "模型测试": "model test", - "当前未开启Midjourney回调,部分项目可能无法获得绘图结果,可在运营设置中开启。": "Current Midjourney callback is not enabled, some projects may not be able to obtain drawing results, which can be enabled in the operation settings." + "当前未开启Midjourney回调,部分项目可能无法获得绘图结果,可在运营设置中开启。": "Current Midjourney callback is not enabled, some projects may not be able to obtain drawing results, which can be enabled in the operation settings.", + "Telegram 身份验证": "Telegram authentication", + "Linux DO 身份验证": "Linux DO authentication", + "协议": "License" } \ No newline at end of file diff --git a/web/src/pages/Home/index.js b/web/src/pages/Home/index.js index 1f58d719..094e4692 100644 --- a/web/src/pages/Home/index.js +++ b/web/src/pages/Home/index.js @@ -4,8 +4,10 @@ import { API, showError, showNotice, timestamp2string } from '../../helpers'; import { StatusContext } from '../../context/Status'; import { marked } from 'marked'; import { StyleContext } from '../../context/Style/index.js'; +import { useTranslation } from 'react-i18next'; const Home = () => { + const { t } = useTranslation(); const [statusState] = useContext(StatusContext); const [homePageContentLoaded, setHomePageContentLoaded] = useState(false); const [homePageContent, setHomePageContent] = useState(''); @@ -60,13 +62,13 @@ const Home = () => { { color: 'var(--semi-color-text-1)', }} > - 系统信息总览 + {t('系统信息总览')} } > -

名称:{statusState?.status?.system_name}

+

{t('名称')}:{statusState?.status?.system_name}

- 版本: + {t('版本')}: {statusState?.status?.version ? statusState?.status?.version : 'unknown'}

- 源码: + {t('源码')}: {

- 协议: + {t('协议')}: { Apache-2.0 License

-

启动时间:{getStartTimeString()}

+

{t('启动时间')}:{getStartTimeString()}

{ color: 'var(--semi-color-text-1)', }} > - 系统配置总览 + {t('系统配置总览')} } >

- 邮箱验证: + {t('邮箱验证')}: {statusState?.status?.email_verification === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}

- GitHub 身份验证: + {t('GitHub 身份验证')}: {statusState?.status?.github_oauth === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}

- 微信身份验证: + {t('微信身份验证')}: {statusState?.status?.wechat_login === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}

- Turnstile 用户校验: + {t('Turnstile 用户校验')}: {statusState?.status?.turnstile_check === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}

- Telegram 身份验证: + {t('Telegram 身份验证')}: {statusState?.status?.telegram_oauth === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}

- Linux DO 身份验证: + {t('Linux DO 身份验证')}: {statusState?.status?.linuxdo_oauth === true - ? '已启用' - : '未启用'} + ? t('已启用') + : t('未启用')}