fix: optimize multilingual display of documents (#6793)

Update Sidebar.tsx
This commit is contained in:
自由的世界人 2025-06-04 17:57:25 +08:00 committed by GitHub
parent c2e6ee907e
commit c1e91bc8aa

View File

@ -35,6 +35,7 @@ import styled from 'styled-components'
import DragableList from '../DragableList' import DragableList from '../DragableList'
import MinAppIcon from '../Icons/MinAppIcon' import MinAppIcon from '../Icons/MinAppIcon'
import UserPopup from '../Popups/UserPopup' import UserPopup from '../Popups/UserPopup'
import i18n from '@renderer/i18n'
const Sidebar: FC = () => { const Sidebar: FC = () => {
const { hideMinappPopup, openMinapp } = useMinappPopup() const { hideMinappPopup, openMinapp } = useMinappPopup()
@ -62,10 +63,13 @@ const Sidebar: FC = () => {
const docsId = 'cherrystudio-docs' const docsId = 'cherrystudio-docs'
const onOpenDocs = () => { const onOpenDocs = () => {
const isChinese = i18n.language.startsWith('zh')
openMinapp({ openMinapp({
id: docsId, id: docsId,
name: t('docs.title'), name: t('docs.title'),
url: 'https://docs.cherry-ai.com/', url: isChinese
? 'https://docs.cherry-ai.com/'
: 'https://docs.cherry-ai.com/cherry-studio-wen-dang/en-us',
logo: AppLogo logo: AppLogo
}) })
} }