chore: update i18n

This commit is contained in:
wonfen
2026-07-24 11:53:50 +08:00
parent 82c486923b
commit bce83d5c6f
123 changed files with 2178 additions and 277 deletions
+12 -19
View File
@@ -214,9 +214,7 @@ const SortableItem = ({
{proxy.delay !== undefined && (
<Chip
label={
proxy.delay > 0
? `${proxy.delay}ms`
: t('shared.labels.timeout') || '超时'
proxy.delay > 0 ? `${proxy.delay}ms` : t('shared.labels.timeout')
}
size="small"
color={
@@ -402,7 +400,7 @@ export const ProxyChain = ({
onUpdateChain([])
} catch (error) {
console.error('Failed to disconnect from proxy chain:', error)
alert(t('proxies.page.chain.disconnectFailed') || '断开链式代理失败')
alert(t('proxies.page.chain.disconnectFailed'))
} finally {
setIsConnecting(false)
}
@@ -410,7 +408,7 @@ export const ProxyChain = ({
}
if (mode === 'global' && proxyView?.global === null) {
alert(t('proxies.page.chain.connectFailed') || '连接链式代理失败')
alert(t('proxies.page.chain.connectFailed'))
return
}
@@ -418,7 +416,7 @@ export const ProxyChain = ({
currentProxyChain.length < 2 ||
currentProxyChain.some(({ recordId }) => !recordId)
) {
alert(t('proxies.page.chain.minimumNodes') || '链式代理至少需要2个节点')
alert(t('proxies.page.chain.minimumNodes'))
return
}
@@ -450,7 +448,7 @@ export const ProxyChain = ({
debugLog('Successfully connected to proxy chain')
} catch (error) {
console.error('Failed to connect to proxy chain:', error)
alert(t('proxies.page.chain.connectFailed') || '连接链式代理失败')
alert(t('proxies.page.chain.connectFailed'))
} finally {
setIsConnecting(false)
}
@@ -526,9 +524,7 @@ export const ProxyChain = ({
backgroundColor: theme.palette.error.light + '20',
},
}}
title={
t('proxies.page.actions.clearChainConfig') || '删除链式配置'
}
title={t('proxies.page.actions.clearChainConfig')}
>
<DeleteIcon fontSize="small" />
</IconButton>
@@ -554,16 +550,15 @@ export const ProxyChain = ({
}}
title={
!isConnected && currentProxyChain.length < 2
? t('proxies.page.chain.minimumNodes') ||
'链式代理至少需要2个节点'
? t('proxies.page.chain.minimumNodes')
: undefined
}
>
{isConnecting
? t('proxies.page.actions.connecting') || '连接中...'
? t('proxies.page.actions.connecting')
: isConnected
? t('proxies.page.actions.disconnect') || '断开'
: t('proxies.page.actions.connect') || '连接'}
? t('proxies.page.actions.disconnect')
: t('proxies.page.actions.connect')}
</Button>
</Box>
</Box>
@@ -573,10 +568,8 @@ export const ProxyChain = ({
sx={{ mb: 2 }}
>
{currentProxyChain.length === 1
? t('proxies.page.chain.minimumNodesHint') ||
'链式代理至少需要2个节点,请再添加一个节点。'
: t('proxies.page.chain.instruction') ||
'按顺序点击节点添加到代理链中'}
? t('proxies.page.chain.minimumNodesHint')
: t('proxies.page.chain.instruction')}
</Alert>
<Box sx={{ flex: 1, overflow: 'auto' }}>
+7 -2
View File
@@ -63,6 +63,7 @@ interface GroupSelectMenuProps {
groups: ProxyGroupOption[]
selectedGroup: string | null
emptyText: string
nodeCountLabel: (count: number) => string
onClose: () => void
onSelect: (groupName: string) => void
}
@@ -162,6 +163,7 @@ function GroupSelectMenu({
groups,
selectedGroup,
emptyText,
nodeCountLabel,
onClose,
onSelect,
}: GroupSelectMenuProps) {
@@ -197,7 +199,7 @@ function GroupSelectMenu({
{group.name}
</Typography>
<Typography variant="caption" color="text.secondary">
{group.type} · {group.members.length} 节点
{group.type} · {nodeCountLabel(group.members.length)}
</Typography>
</Box>
</MenuItem>
@@ -521,7 +523,10 @@ export function ProxyGroupsChain(props: ProxyGroupsChainProps) {
anchorEl={ruleMenuAnchor}
groups={availableGroups}
selectedGroup={activeSelectedGroup}
emptyText="暂无可用代理组"
emptyText={t('proxies.page.empty.noAvailableGroups')}
nodeCountLabel={(count) =>
t('proxies.page.labels.nodeCount', { count })
}
onClose={handleGroupMenuClose}
onSelect={handleGroupSelect}
/>
+1 -1
View File
@@ -183,7 +183,7 @@ export const ProxyItemMini = (props: Props) => {
':hover': { bgcolor: alpha(palette.primary.main, 0.15) },
})}
>
Check
{t('shared.actions.check')}
</Widget>
)}
+3 -1
View File
@@ -10,6 +10,7 @@ import {
type SxProps,
type Theme,
} from '@mui/material'
import { useTranslation } from 'react-i18next'
import { BaseLoading } from '@/components/base'
import { useProxyDelayState } from '@/hooks/use-proxy-delay-state'
@@ -49,6 +50,7 @@ const TypeBox = styled('span')(({ theme }) => ({
}))
export const ProxyItem = (props: Props) => {
const { t } = useTranslation()
const { group, member, selected, showType = true, sx, onClick } = props
const details = memberDetails(member)
const unresolved = member.kind === 'unresolved'
@@ -160,7 +162,7 @@ export const ProxyItem = (props: Props) => {
':hover': { bgcolor: alpha(palette.primary.main, 0.15) },
})}
>
Check
{t('shared.actions.check')}
</Widget>
)}
+3 -1
View File
@@ -262,7 +262,9 @@ export const ProxyRender = memo(function ProxyRender(props: RenderProps) {
}}
>
<InboxRounded sx={{ fontSize: '2.5em', color: 'inherit' }} />
<Typography sx={{ color: 'inherit' }}>No Proxies</Typography>
<Typography sx={{ color: 'inherit' }}>
{t('proxies.page.empty.noProxies')}
</Typography>
</Box>
)
}