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

@@ -8,8 +8,7 @@ import type { Collection } from '../types'
import { CollectionType, LOC } from '../types'
import { Settings01 } from '../../base/icons/src/vender/line/general'
import I18n from '@/context/i18n'
import { getModelRuntimeSupported } from '@/utils/language'
import { getLanguage } from '@/i18n/language'
type Props = {
icon: JSX.Element
collection: Collection
@@ -26,7 +25,7 @@ const Header: FC<Props> = ({
onShowEditCustomCollection,
}) => {
const { locale } = useContext(I18n)
const language = getModelRuntimeSupported(locale)
const language = getLanguage(locale)
const { t } = useTranslation()
const isInToolsPage = loc === LOC.tools
const isInDebugPage = !isInToolsPage