Fix/language support (#2154)

This commit is contained in:
crazywoola
2024-01-24 11:08:11 +08:00
committed by GitHub
parent 00f4e6ec44
commit e58c3ac374
28 changed files with 103 additions and 71 deletions

View File

@@ -16,7 +16,7 @@ import { useAppContext } from '@/context/app-context'
import { ArrowUpRight, ChevronDown } from '@/app/components/base/icons/src/vender/line/arrows'
import { LogOut01 } from '@/app/components/base/icons/src/vender/line/general'
import { useModalContext } from '@/context/modal-context'
import { LanguagesSupportedUnderscore, getModelRuntimeSupported } from '@/utils/language'
export type IAppSelecotr = {
isMobile: boolean
}
@@ -30,6 +30,7 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
const [aboutVisible, setAboutVisible] = useState(false)
const { locale } = useContext(I18n)
const language = getModelRuntimeSupported(locale)
const { t } = useTranslation()
const { userProfile, langeniusVersionInfo } = useAppContext()
const { setShowAccountSettingModal } = useModalContext()
@@ -122,7 +123,7 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
<Link
className={classNames(itemClassName, 'group justify-between')}
href={
locale === 'en' ? 'https://docs.dify.ai/' : `https://docs.dify.ai/v/${locale.toLowerCase()}/`
language !== LanguagesSupportedUnderscore[1] ? 'https://docs.dify.ai/' : `https://docs.dify.ai/v/${locale.toLowerCase()}/`
}
target='_blank'>
<div>{t('common.userProfile.helpCenter')}</div>