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
3df562d0
Commit
3df562d0
authored
Jun 27, 2023
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: i18n and success notify
parent
04abd4b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
58 deletions
+64
-58
index.tsx
web/app/components/share/chat/index.tsx
+2
-0
index.tsx
web/app/components/share/chat/sidebar/index.tsx
+2
-2
share-app.en.ts
web/i18n/lang/share-app.en.ts
+30
-28
share-app.zh.ts
web/i18n/lang/share-app.zh.ts
+30
-28
No files found.
web/app/components/share/chat/index.tsx
View file @
3df562d0
...
...
@@ -103,11 +103,13 @@ const Main: FC<IMainProps> = ({
}
const
handlePin
=
async
(
id
:
string
)
=>
{
await
pinConversation
(
isInstalledApp
,
installedAppInfo
?.
id
,
id
)
notify
({
type
:
'success'
,
message
:
t
(
'common.api.success'
)
})
noticeUpdateList
()
}
const
handleUnpin
=
async
(
id
:
string
)
=>
{
await
unpinConversation
(
isInstalledApp
,
installedAppInfo
?.
id
,
id
)
notify
({
type
:
'success'
,
message
:
t
(
'common.api.success'
)
})
noticeUpdateList
()
}
...
...
web/app/components/share/chat/sidebar/index.tsx
View file @
3df562d0
...
...
@@ -92,7 +92,7 @@ const Sidebar: FC<ISidebarProps> = ({
{
/* pinned list */
}
{
hasPinned
&&
(
<
div
className=
'mt-4 px-4'
>
<
div
className=
'
leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
Pinned
</
div
>
<
div
className=
'
mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.pinnedTitle'
)
}
</
div
>
<
List
className=
'max-h-[40vh]'
currentId=
{
currentId
}
...
...
@@ -111,7 +111,7 @@ const Sidebar: FC<ISidebarProps> = ({
{
/* unpinned list */
}
<
div
className=
'mt-4 px-4'
>
{
hasPinned
&&
(
<
div
className=
'
leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
Chats
</
div
>
<
div
className=
'
mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.unpinnedTitle'
)
}
</
div
>
)
}
<
List
className=
{
cn
(
hasPinned
?
'max-h-[40vh]'
:
'flex-grow'
)
}
...
...
web/i18n/lang/share-app.en.ts
View file @
3df562d0
const
translation
=
{
common
:
{
welcome
:
"Welcome to use"
,
appUnavailable
:
"App is unavailable"
,
appUnkonwError
:
"App is unavailable"
welcome
:
'Welcome to use'
,
appUnavailable
:
'App is unavailable'
,
appUnkonwError
:
'App is unavailable'
,
},
chat
:
{
newChat
:
"New chat"
,
newChatDefaultName
:
"New conversation"
,
powerBy
:
"Powered by"
,
prompt
:
"Prompt"
,
privatePromptConfigTitle
:
"Conversation settings"
,
publicPromptConfigTitle
:
"Initial Prompt"
,
configStatusDes
:
"Before start, you can modify conversation settings"
,
newChat
:
'New chat'
,
pinnedTitle
:
'Pinned'
,
unpinnedTitle
:
'Chats'
,
newChatDefaultName
:
'New conversation'
,
powerBy
:
'Powered by'
,
prompt
:
'Prompt'
,
privatePromptConfigTitle
:
'Conversation settings'
,
publicPromptConfigTitle
:
'Initial Prompt'
,
configStatusDes
:
'Before start, you can modify conversation settings'
,
configDisabled
:
"Previous session settings have been used for this session."
,
startChat
:
"Start Chat"
,
'Previous session settings have been used for this session.'
,
startChat
:
'Start Chat'
,
privacyPolicyLeft
:
"Please read the "
,
'Please read the '
,
privacyPolicyMiddle
:
"privacy policy"
,
'privacy policy'
,
privacyPolicyRight
:
" provided by the app developer."
,
' provided by the app developer.'
,
},
generation
:
{
tabs
:
{
create
:
"Create"
,
saved
:
"Saved"
,
create
:
'Create'
,
saved
:
'Saved'
,
},
savedNoData
:
{
title
:
"You haven't saved a result yet!"
,
title
:
'You haven
\'
t saved a result yet!'
,
description
:
'Start generating content, and find your saved results here.'
,
startCreateContent
:
'Start create content'
startCreateContent
:
'Start create content'
,
},
title
:
"AI Completion"
,
queryTitle
:
"Query content"
,
queryPlaceholder
:
"Write your query content..."
,
run
:
"RUN"
,
copy
:
"Copy"
,
resultTitle
:
"AI Completion"
,
noData
:
"AI will give you what you want here."
,
title
:
'AI Completion'
,
queryTitle
:
'Query content'
,
queryPlaceholder
:
'Write your query content...'
,
run
:
'RUN'
,
copy
:
'Copy'
,
resultTitle
:
'AI Completion'
,
noData
:
'AI will give you what you want here.'
,
},
}
;
}
export
default
translation
;
export
default
translation
web/i18n/lang/share-app.zh.ts
View file @
3df562d0
const
translation
=
{
common
:
{
welcome
:
"欢迎使用"
,
appUnavailable
:
"应用不可用"
,
appUnkonwError
:
"应用不可用"
,
welcome
:
'欢迎使用'
,
appUnavailable
:
'应用不可用'
,
appUnkonwError
:
'应用不可用'
,
},
chat
:
{
newChat
:
"新对话"
,
newChatDefaultName
:
"新的对话"
,
powerBy
:
"Powered by"
,
prompt
:
"提示词"
,
privatePromptConfigTitle
:
"对话设置"
,
publicPromptConfigTitle
:
"对话前提示词"
,
configStatusDes
:
"开始前,您可以修改对话设置"
,
configDisabled
:
"此次会话已使用上次会话表单"
,
startChat
:
"开始对话"
,
privacyPolicyLeft
:
"请阅读由该应用开发者提供的"
,
privacyPolicyMiddle
:
"隐私政策"
,
privacyPolicyRight
:
"。"
,
newChat
:
'新对话'
,
pinnedTitle
:
'已置顶'
,
unpinnedTitle
:
'对话列表'
,
newChatDefaultName
:
'新的对话'
,
powerBy
:
'Powered by'
,
prompt
:
'提示词'
,
privatePromptConfigTitle
:
'对话设置'
,
publicPromptConfigTitle
:
'对话前提示词'
,
configStatusDes
:
'开始前,您可以修改对话设置'
,
configDisabled
:
'此次会话已使用上次会话表单'
,
startChat
:
'开始对话'
,
privacyPolicyLeft
:
'请阅读由该应用开发者提供的'
,
privacyPolicyMiddle
:
'隐私政策'
,
privacyPolicyRight
:
'。'
,
},
generation
:
{
tabs
:
{
create
:
"创建"
,
saved
:
"已保存"
,
create
:
'创建'
,
saved
:
'已保存'
,
},
savedNoData
:
{
title
:
"您还没有保存结果!"
,
title
:
'您还没有保存结果!'
,
description
:
'开始生成内容,您可以在这里找到保存的结果。'
,
startCreateContent
:
'开始生成内容'
startCreateContent
:
'开始生成内容'
,
},
title
:
"AI 智能书写"
,
queryTitle
:
"查询内容"
,
queryPlaceholder
:
"请输入文本内容"
,
run
:
"运行"
,
copy
:
"拷贝"
,
resultTitle
:
"AI 书写"
,
noData
:
"AI 会在这里给你惊喜。"
,
title
:
'AI 智能书写'
,
queryTitle
:
'查询内容'
,
queryPlaceholder
:
'请输入文本内容'
,
run
:
'运行'
,
copy
:
'拷贝'
,
resultTitle
:
'AI 书写'
,
noData
:
'AI 会在这里给你惊喜。'
,
},
}
;
}
export
default
translation
;
export
default
translation
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