mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-25 02:33:00 +08:00
Feat/i18n restructure (#2529)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -10,8 +10,7 @@ import { CollectionType } from '../types'
|
||||
import TooltipPlus from '../../base/tooltip-plus'
|
||||
import I18n from '@/context/i18n'
|
||||
import SettingBuiltInTool from '@/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool'
|
||||
import { getModelRuntimeSupported } from '@/utils/language'
|
||||
|
||||
import { getLanguage } from '@/i18n/language'
|
||||
type Props = {
|
||||
collection: Collection
|
||||
icon: JSX.Element
|
||||
@@ -33,7 +32,8 @@ const Item: FC<Props> = ({
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const { locale } = useContext(I18n)
|
||||
const language = getModelRuntimeSupported(locale)
|
||||
const language = getLanguage(locale)
|
||||
|
||||
const isBuiltIn = collection.type === CollectionType.builtIn
|
||||
const canShowDetail = !isBuiltIn || (isBuiltIn && isInToolsPage)
|
||||
const [showDetail, setShowDetail] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user