Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
02d37d21
Commit
02d37d21
authored
Jul 24, 2023
by
金伟强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: translate
parent
71f96123
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
index.tsx
...ents/explore/universal-chat/config/model-config/index.tsx
+4
-1
explore.en.ts
web/i18n/lang/explore.en.ts
+1
-0
explore.zh.ts
web/i18n/lang/explore.zh.ts
+3
-1
No files found.
web/app/components/explore/universal-chat/config/model-config/index.tsx
View file @
02d37d21
...
...
@@ -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
}
/>
...
...
web/i18n/lang/explore.en.ts
View file @
02d37d21
...
...
@@ -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
:
{
...
...
web/i18n/lang/explore.zh.ts
View file @
02d37d21
...
...
@@ -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
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment