🐛fix: translation fallback (#5554)

* 🐛fix: translation fallback

* 🧹cleanup: remove duplicate key translation
This commit is contained in:
Faisal Amir 2025-06-26 23:59:53 +07:00 committed by GitHub
parent 7223f6fc3f
commit 6380ad0657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 38 deletions

View File

@ -1,7 +1,7 @@
import { useEffect, useState } from 'react'
import { listen } from '@tauri-apps/api/event'
import { invoke } from '@tauri-apps/api/core'
import { t } from 'i18next'
import {
Dialog,
DialogContent,
@ -11,8 +11,10 @@ import {
DialogTitle,
} from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
import { useTranslation } from '@/i18n'
export function CortexFailureDialog() {
const { t } = useTranslation()
const [showDialog, setShowDialog] = useState(false)
useEffect(() => {
@ -52,15 +54,10 @@ export function CortexFailureDialog() {
<Dialog open={showDialog} onOpenChange={setShowDialog}>
<DialogContent>
<DialogHeader>
<DialogTitle>
{t('cortexFailureDialog.title', 'Local AI Engine Issue')}
</DialogTitle>
<DialogTitle>{t('cortexFailureDialog.title')}</DialogTitle>
</DialogHeader>
<DialogDescription>
{t(
'cortexFailureDialog.description',
'The local AI engine (Cortex) failed to start after multiple attempts. This might prevent some features from working correctly.'
)}
{t('cortexFailureDialog.description')}
</DialogDescription>
<DialogFooter className="flex gap-2">
<Button
@ -77,12 +74,12 @@ export function CortexFailureDialog() {
rel="noopener noreferrer"
>
<span className="text-main-view-fg/70">
{t('cortexFailureDialog.contactSupport', 'Contact Support')}
{t('cortexFailureDialog.contactSupport')}
</span>
</a>
</Button>
<Button onClick={handleRestartJan}>
{t('cortexFailureDialog.restartJan', 'Restart Jan')}
{t('cortexFailureDialog.restartJan')}
</Button>
</DialogFooter>
</DialogContent>

View File

@ -256,12 +256,5 @@
"description": "Cortex gagal dimulai. Silakan periksa log untuk detail lebih lanjut.",
"contactSupport": "Hubungi Dukungan",
"restartJan": "Restart Jan"
},
"outOfContextError": {
"title": "Kesalahan di luar konteks",
"description": "Obrolan ini mencapai batas memori AI, seperti papan tulis yang penuh. Kami dapat memperluas jendela memori (disebut ukuran konteks) sehingga mengingat lebih banyak, tetapi mungkin menggunakan lebih banyak memori komputer Anda. Kami juga dapat memotong input, yang berarti akan melupakan sebagian riwayat obrolan untuk memberi ruang bagi pesan baru.",
"increaseContextSizeDescription": "Apakah Anda ingin meningkatkan ukuran konteks?",
"truncateInput": "Potong Input",
"increaseContextSize": "Tingkatkan Ukuran Konteks"
}
}

View File

@ -256,12 +256,5 @@
"description": "Cortex không khởi động được. Vui lòng kiểm tra log để biết thêm chi tiết.",
"contactSupport": "Liên hệ Hỗ trợ",
"restartJan": "Khởi động lại Jan"
},
"outOfContextError": {
"title": "Lỗi ngoài ngữ cảnh",
"description": "Cuộc trò chuyện này đang đạt đến giới hạn bộ nhớ của AI, giống như một bảng trắng đang đầy. Chúng ta có thể mở rộng cửa sổ bộ nhớ (gọi là kích thước ngữ cảnh) để nó nhớ nhiều hơn, nhưng có thể sử dụng nhiều bộ nhớ máy tính của bạn hơn. Chúng ta cũng có thể cắt bớt đầu vào, có nghĩa là nó sẽ quên một phần lịch sử trò chuyện để nhường chỗ cho tin nhắn mới.",
"increaseContextSizeDescription": "Bạn có muốn tăng kích thước ngữ cảnh không?",
"truncateInput": "Cắt bớt Đầu vào",
"increaseContextSize": "Tăng Kích thước Ngữ cảnh"
}
}

View File

@ -256,12 +256,5 @@
"description": "Cortex 启动失败。请检查日志以获取更多详细信息。",
"contactSupport": "联系支持",
"restartJan": "重启 Jan"
},
"outOfContextError": {
"title": "超出上下文错误",
"description": "此聊天正在达到AI的内存限制就像白板填满了一样。我们可以扩展内存窗口称为上下文大小使其记住更多内容但可能会使用更多计算机内存。我们也可以截断输入这意味着它会忘记一些聊天历史记录为新消息腾出空间。",
"increaseContextSizeDescription": "您想要增加上下文大小吗?",
"truncateInput": "截断输入",
"increaseContextSize": "增加上下文大小"
}
}

View File

@ -256,12 +256,5 @@
"description": "Cortex 啟動失敗。請檢查日誌以獲取更多詳細信息。",
"contactSupport": "聯繫支援",
"restartJan": "重啟 Jan"
},
"outOfContextError": {
"title": "超出上下文錯誤",
"description": "此聊天正在達到AI的記憶體限制就像白板填滿了一樣。我們可以擴展記憶體視窗稱為上下文大小使其記住更多內容但可能會使用更多電腦記憶體。我們也可以截斷輸入這意味著它會忘記一些聊天歷史記錄為新訊息騰出空間。",
"increaseContextSizeDescription": "您想要增加上下文大小嗎?",
"truncateInput": "截斷輸入",
"increaseContextSize": "增加上下文大小"
}
}