Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix i18n #132

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions web/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
"model": "Model (OpenAI GPT4 needs separate application, Claude's free key can use all Claude models)",
"sessionConfig": "Conversation Settings:"
},
"chat_snapshot": {
"title": "Chat Records"
},
"setting": {
"setting": "Settings",
"general": "Overview",
Expand All @@ -86,7 +89,6 @@
"admin": {
"openPanel": "Open Admin Panel",
"title": "Admin",
"refresh": "Refresh",
"permission": "Permission",
"rateLimit": "Rate Limit",
"userEmail": "User Email",
Expand All @@ -98,7 +100,19 @@
"rateLimit10Min": "Message Limit (10 minutes)",
"totalChatMessagesTokenCount": "Total token count",
"totalChatMessages3DaysTokenCount": "Total token count (3 days)",
"totalChatMessages3DaysAvgTokenCount": "Average token count (3 days)"
"totalChatMessages3DaysAvgTokenCount": "Average token count (3 days)",
"refresh": "Refresh",
"model": "Model",
"model_one_default_only": "There can only be one default model, please set other models as non-default first.",
"chat_model": {
"name": "ID",
"label": "Model name",
"isDefault": "Default?",
"apiAuthHeader": "Auth Header key",
"apiAuthKey": "API KEY corresponding to the environment variable",
"actions": "Actions",
"url": "Request full URL"
}
},
"error": {
"rateLimit": "The message sending limit has been reached, please contact the administrator.",
Expand Down
3 changes: 3 additions & 0 deletions web/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
"enable_debug": "启用",
"disable_debug": "关闭"
},
"chat_snapshot": {
"title": "对话集"
},
"admin": {
"openPanel": "在新标签页中打开(仅限管理员)",
"title": "管理",
Expand Down
17 changes: 15 additions & 2 deletions web/src/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@
"rateLimit10Min": "訊息數量上限(10分鐘)",
"totalChatMessagesTokenCount": "總token數量",
"totalChatMessages3DaysTokenCount": "總token數量(3天)",
"totalChatMessages3DaysAvgTokenCount": "平均token數量(3天)"
}
"totalChatMessages3DaysAvgTokenCount": "平均token數量(3天)",
"refresh": "重新整理",
"model": "模型",
"model_one_default_only": "只能有一個默認模型,請先將其他模型設置為非默認",
"chat_model": {
"name": "身分識別號",
"label": "模型名稱",
"isDefault": "默認?",
"apiAuthHeader": "Auth Header 鍵",
"apiAuthKey": "API KEY對應的環境變量",
"actions": "操作",
"url": "完整的URL請求"
}
},
"chat_snapshot": {"title": "對話集"}
}
4 changes: 2 additions & 2 deletions web/src/views/snapshot/all.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface PostLink {
const posts = ref<PostLink[]>()

onMounted(async () => {
posts.value = (await fetchSnapshotAll()).map((post:any) => {
posts.value = (await fetchSnapshotAll()).map((post: any) => {
return {
uuid: post.Uuid,
date: displayLocaleDate(post.CreatedAt),
Expand Down Expand Up @@ -40,7 +40,7 @@ function post_url(uuid: string): string {
/>
</svg>
<h1 class="text-2xl font-semibold text-gray-900">
Chat Snapshot
{{ $t('chat_snapshot.title') }}
</h1>
</div>
</header>
Expand Down