fix: translations

This commit is contained in:
Louis 2025-07-15 11:11:00 +07:00
parent 8e85c2fd06
commit 08fe2c27fd
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
6 changed files with 10 additions and 15 deletions

View File

@ -10,7 +10,6 @@ import { Button } from '@/components/ui/button'
import { useToolApproval } from '@/hooks/useToolApproval' import { useToolApproval } from '@/hooks/useToolApproval'
import { AlertTriangle } from 'lucide-react' import { AlertTriangle } from 'lucide-react'
import { useTranslation } from '@/i18n/react-i18next-compat' import { useTranslation } from '@/i18n/react-i18next-compat'
import { Trans } from 'react-i18next'
export default function ToolApproval() { export default function ToolApproval() {
const { t } = useTranslation() const { t } = useTranslation()
@ -52,11 +51,8 @@ export default function ToolApproval() {
<div> <div>
<DialogTitle>{t('tools:toolApproval.title')}</DialogTitle> <DialogTitle>{t('tools:toolApproval.title')}</DialogTitle>
<DialogDescription className="mt-1 text-main-view-fg/70"> <DialogDescription className="mt-1 text-main-view-fg/70">
<Trans {t('tools:toolApproval.description')}{' '}
i18nKey="tools:toolApproval.description" <span className="font-semibold">{toolName}</span>
values={{ toolName }}
components={{ strong: <strong className="font-semibold" /> }}
/>
</DialogDescription> </DialogDescription>
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
{ {
"assistants": "Assistants", "assistants": "Assistants",
"hardware": "Hardware", "hardware": "Hardware",
"mcp-servers": "Mcp Servers", "mcp-servers": "MCP Servers",
"local_api_server": "Local API Server", "local_api_server": "Local API Server",
"https_proxy": "HTTPS Proxy", "https_proxy": "HTTPS Proxy",
"extensions": "Extensions", "extensions": "Extensions",

View File

@ -1,10 +1,10 @@
{ {
"toolApproval": { "toolApproval": {
"title": "Tool Approval Required", "title": "Tool Approval Required",
"description": "The assistant wants to use <strong>{{toolName}}</strong>", "description": "The assistant wants to use",
"securityNotice": "This tool wants to perform an action. Please review and approve.", "securityNotice": "Malicious tools or conversation content could potentially trick the assistant into attempting harmful actions. Review each tool call carefully before approving.",
"deny": "Deny", "deny": "Deny",
"allowOnce": "Allow Once", "allowOnce": "Allow Once",
"alwaysAllow": "Always Allow" "alwaysAllow": "Always Allow"
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"title": "Permintaan Panggilan Alat", "title": "Permintaan Panggilan Alat",
"description": "Asisten ingin menggunakan alat: <strong>{{toolName}}</strong>", "description": "Asisten ingin menggunakan alat: <strong>{{toolName}}</strong>",
"securityNotice": "<strong>Pemberitahuan Keamanan:</strong> Alat berbahaya atau konten percakapan berpotensi menipu asisten untuk mencoba tindakan berbahaya. Tinjau setiap panggilan alat dengan cermat sebelum menyetujui.", "securityNotice": "<strong>Pemberitahuan Keamanan:</strong> Alat berbahaya atau konten percakapan dapat menipu asisten untuk mencoba melakukan tindakan yang merugikan. Tinjau setiap permintaan penggunaan alat dengan cermat sebelum menyetujui.",
"deny": "Tolak", "deny": "Tolak",
"allowOnce": "Izinkan Sekali", "allowOnce": "Izinkan Sekali",
"alwaysAllow": "Selalu Izinkan", "alwaysAllow": "Selalu Izinkan",

View File

@ -1,7 +1,7 @@
{ {
"assistants": "Trợ lý", "assistants": "Trợ lý",
"hardware": "Phần cứng", "hardware": "Phần cứng",
"mcp-servers": "Máy chủ Mcp", "mcp-servers": "Máy chủ MCP",
"local_api_server": "Máy chủ API cục bộ", "local_api_server": "Máy chủ API cục bộ",
"https_proxy": "Proxy HTTPS", "https_proxy": "Proxy HTTPS",
"extensions": "Tiện ích mở rộng", "extensions": "Tiện ích mở rộng",

View File

@ -5,7 +5,6 @@ import HeaderPage from '@/containers/HeaderPage'
import { Switch } from '@/components/ui/switch' import { Switch } from '@/components/ui/switch'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Card, CardItem } from '@/containers/Card' import { Card, CardItem } from '@/containers/Card'
import LanguageSwitcher from '@/containers/LanguageSwitcher'
import { useTranslation } from '@/i18n/react-i18next-compat' import { useTranslation } from '@/i18n/react-i18next-compat'
import { useGeneralSetting } from '@/hooks/useGeneralSetting' import { useGeneralSetting } from '@/hooks/useGeneralSetting'
import { useAppUpdater } from '@/hooks/useAppUpdater' import { useAppUpdater } from '@/hooks/useAppUpdater'
@ -239,10 +238,10 @@ function General() {
</Button> </Button>
} }
/> />
<CardItem {/* <CardItem
title={t('common:language')} title={t('common:language')}
actions={<LanguageSwitcher />} actions={<LanguageSwitcher />}
/> /> */}
</Card> </Card>
{/* Advanced */} {/* Advanced */}