mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +08:00
fix: optimize multilingual display of documents (#6793)
Update Sidebar.tsx
This commit is contained in:
parent
c2e6ee907e
commit
c1e91bc8aa
@ -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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user