Skip to content

Commit

Permalink
perf: add localization for sider (Chanzhaoyu#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwu53 committed Mar 27, 2023
1 parent c3f4311 commit 799af86
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
unauthorizedTips: 'Unauthorized, please verify first.',
},
chat: {
newChatButton: 'New Chat',
placeholder: 'Ask me anything...(Shift + Enter = line break)',
placeholderMobile: 'Ask me anything...',
copy: 'Copy',
Expand Down Expand Up @@ -70,6 +71,7 @@ export default {
balance: 'API Balance',
},
store: {
siderButton: 'Prompt Store',
local: 'Local',
online: 'Online',
title: 'Title',
Expand Down
2 changes: 2 additions & 0 deletions src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
unauthorizedTips: '未经授权,请先进行验证。',
},
chat: {
newChatButton: '新建聊天',
placeholder: '来说点什么吧...(Shift + Enter = 换行)',
placeholderMobile: '来说点什么...',
copy: '复制',
Expand Down Expand Up @@ -70,6 +71,7 @@ export default {
balance: 'API余额',
},
store: {
siderButton: '提示词商店',
local: '本地',
online: '在线',
title: '标题',
Expand Down
2 changes: 2 additions & 0 deletions src/locales/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
unauthorizedTips: '未經授權,請先進行驗證。',
},
chat: {
newChatButton: '新建對話',
placeholder: '來說點什麼...(Shift + Enter = 換行)',
placeholderMobile: '來說點什麼...',
copy: '複製',
Expand Down Expand Up @@ -70,6 +71,7 @@ export default {
balance: 'API余額',
},
store: {
siderButton: '提示詞商店',
local: '本機',
online: '線上',
title: '標題',
Expand Down
4 changes: 2 additions & 2 deletions src/views/chat/layout/sider/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ watch(
<main class="flex flex-col flex-1 min-h-0">
<div class="p-4">
<NButton dashed block @click="handleAdd">
New chat
{{ $t('chat.newChatButton') }}
</NButton>
</div>
<div class="flex-1 min-h-0 pb-4 overflow-hidden">
<List />
</div>
<div class="p-4">
<NButton block @click="show = true">
Prompt Store
{{ $t('store.siderButton') }}
</NButton>
</div>
</main>
Expand Down

0 comments on commit 799af86

Please sign in to comment.