Feat/i18n restructure (#2529)

This commit is contained in:
crazywoola
2024-02-23 14:31:06 +08:00
committed by GitHub
parent 91ea6fe4ee
commit 9574730050
140 changed files with 448 additions and 659 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'
import { LanguagesSupported } from '@/i18n/language'
export type IAppSelecotr = {
isMobile: boolean
}
@@ -30,7 +30,6 @@ 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()
@@ -123,7 +122,7 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
<Link
className={classNames(itemClassName, 'group justify-between')}
href={
language !== LanguagesSupportedUnderscore[1] ? 'https://docs.dify.ai/' : `https://docs.dify.ai/v/${locale.toLowerCase()}/`
locale !== LanguagesSupported[1] ? 'https://docs.dify.ai/' : `https://docs.dify.ai/v/${locale.toLowerCase()}/`
}
target='_blank' rel='noopener noreferrer'>
<div>{t('common.userProfile.helpCenter')}</div>