feat(i18n): add multi-language support (ja/ko/vi/ru/zh-TW) with system auto-detection

- Extend AppLanguage to 7 locales: zh-CN, zh-TW, en, ja, ko, vi, ru
- Auto-detect system language via navigator.languages; fallback to English
- Add BCP47 locale mapping for date formatting and sorting
- Create 50 translation JSON files (5 languages × 10 namespaces, 1137 keys each)
- Update language selector with native language names
- Extend locale key parity test to cover all 7 languages (70 assertions)
- Add VNC/RDP desktop, serial terminal, AI agent, port forwarding, and SFTP features
- Add credential encryption, host metrics, session backup crypto, and zmodem bridge
- Update Rust backend: desktop services, host metrics, SSH/SFTP enhancements
This commit is contained in:
Logan.Li committed 2026-08-12 00:07:48 +08:00
1 parent fea6d8db04
commit b0d0e3a5f3
301 files changed
+28002 -2705

No files matched your search

@@ -3,6 +3,7 @@
*/
import { useRef, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
interface MenuItem {
label: string
@@ -34,6 +35,7 @@ export function TabContextMenu({
onCloseAll,
onClone,
}: TabContextMenuProps) {
const { t } = useTranslation('common')
const menuRef = useRef<HTMLDivElement>(null)
useEffect(() => {
@@ -49,15 +51,15 @@ export function TabContextMenu({
if (!isOpen) return null
const items: MenuItem[] = [
{ label: '关闭', action: onCloseTab },
{ label: '关闭其他', action: onCloseOthers },
{ label: '关闭右侧标签', action: onCloseRight },
{ label: '关闭左侧标签', action: onCloseLeft },
{ label: '关闭全部', action: onCloseAll, danger: true },
{ label: t('action.close'), action: onCloseTab },
{ label: t('tab.menu.closeOthers'), action: onCloseOthers },
{ label: t('tab.menu.closeRight'), action: onCloseRight },
{ label: t('tab.menu.closeLeft'), action: onCloseLeft },
{ label: t('tab.menu.closeAll'), action: onCloseAll, danger: true },
]
if (onClone) {
items.unshift({ label: '克隆标签', action: onClone })
items.unshift({ label: t('tab.menu.clone'), action: onClone })
}
return (