Commit 02d37d21 authored by 金伟强's avatar 金伟强

chore: translate

parent 71f96123
......@@ -4,6 +4,7 @@ import React from 'react'
import cn from 'classnames'
import { useBoolean, useClickAway } from 'ahooks'
import { ChevronDownIcon } from '@heroicons/react/24/outline'
import { useTranslation } from 'react-i18next'
import ModelIcon from '@/app/components/app/configuration/config-model/model-icon'
import { UNIVERSAL_CHAT_MODEL_LIST as MODEL_LIST } from '@/config'
......@@ -18,6 +19,8 @@ const ModelConfig: FC<IModelConfigProps> = ({
onChange,
readonly,
}) => {
const { t } = useTranslation()
const currModel = MODEL_LIST.find(item => item.id === modelId)
const [isShowOption, { setFalse: hideOption, toggle: toogleOption }] = useBoolean(false)
const triggerRef = React.useRef(null)
......@@ -27,7 +30,7 @@ const ModelConfig: FC<IModelConfigProps> = ({
return (
<div className='flex items-center justify-between h-[52px] px-3 rounded-xl bg-gray-50'>
<div className='text-sm font-semibold text-gray-800'>Model</div>
<div className='text-sm font-semibold text-gray-800'>{t('explore.universalChat.model')}</div>
<div className="relative z-10">
<div ref={triggerRef} onClick={() => !readonly && toogleOption()} className={cn(readonly ? 'cursor-not-allowed' : 'cursor-pointer', 'flex items-center h-9 px-3 space-x-2 rounded-lg bg-gray-50 ')}>
<ModelIcon modelId={currModel?.id as string} />
......
......@@ -38,6 +38,7 @@ const translation = {
universalChat: {
welcome: 'Start chat with Dify',
welcomeDescribe: 'Your AI conversation companion for personalized assistance',
model: 'Model',
plugins: {
name: 'Plugins',
google_search: {
......
......@@ -2,7 +2,7 @@ const translation = {
title: '我的应用',
sidebar: {
discovery: '发现',
chat: '聊天',
chat: '智聊',
workspace: '工作区',
action: {
pin: '置顶',
......@@ -38,7 +38,9 @@ const translation = {
universalChat: {
welcome: '开始和 Dify 聊天吧',
welcomeDescribe: '您的 AI 对话伴侣,为您提供个性化的帮助',
model: '模型',
plugins: {
name: '插件',
google_search: {
name: '谷歌搜索',
more: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment