Files
CLICD/frontend/src/utils/i18n.ts
T
MengMengCode 38debab1aa Add custom image handling and access policy management
- Implement tests for custom KVM and LXC image creation, ensuring invalid sources and architecture mismatches are rejected.
- Introduce access policy management in CLI, allowing configuration of allowed sources and trusted proxies.
- Add NAT network configuration with validation for RFC1918 compliance and subnet parsing.
- Create panel access policy management, including normalization and evaluation of access decisions based on client IPs and forwarded headers.
- Develop middleware for enforcing access policies in the server, returning appropriate responses for allowed and denied requests.
- Enhance custom image downloading and validation, ensuring integrity and security of downloaded root filesystem archives.
- Include comprehensive tests for all new functionalities to ensure reliability and correctness.
2026-07-26 04:04:45 +08:00

1295 lines
69 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const exact: Record<string, string> = {
'控制面板': 'Dashboard',
'共': 'Total',
'第': 'Page',
'页': 'page',
'个': 'items',
'条': 'records',
'核': 'cores',
'个容器': 'containers',
'条操作记录': 'audit records',
'个地址': 'addresses',
'列表': 'List',
'主机资源': 'Host Resources',
'主机资源状态': 'Host Resource Status',
'容器管理': 'Containers',
'镜像管理': 'Images',
'安全告警': 'Security Alerts',
'快照管理': 'Snapshots',
'路由管理': 'Routing',
'操作日志': 'Audit Logs',
'子用户管理': 'Sub Users',
'API 集成': 'API Integration',
'宿主机信息': 'Host Info',
'面板设置': 'Panel Settings',
'退出登录': 'Log out',
'亮色模式': 'Light Mode',
'暗黑模式': 'Dark Mode',
'切换亮色模式': 'Switch to light mode',
'切换暗黑模式': 'Switch to dark mode',
'切换侧边栏': 'Toggle sidebar',
'刷新': 'Refresh',
'搜索': 'Search',
'复制': 'Copy',
'编辑': 'Edit',
'删除': 'Delete',
'保存': 'Save',
'提交': 'Submit',
'应用': 'Apply',
'查看': 'View',
'详情': 'Details',
'返回': 'Back',
'返回列表': 'Back to list',
'取消': 'Cancel',
'确认': 'Confirm',
'确定': 'OK',
'完成': 'Done',
'失败': 'Failed',
'成功': 'Success',
'提示': 'Notice',
'警告': 'Warning',
'开机': 'Start',
'关机': 'Stop',
'重启': 'Restart',
'重装': 'Reinstall',
'创建': 'Create',
'在线': 'Online',
'离线': 'Offline',
'永久': 'Permanent',
'长期有效': 'No expiration',
'长期': 'No expiration',
'不限制': 'Unlimited',
'未设置流量限制': 'No traffic limit set',
'未设置': 'Not set',
'已选': 'Selected',
',已选': ', selected',
'筛选后': 'Filtered',
',筛选后': ', filtered',
'每页数量': 'Items per page',
'任务中': 'In task',
'1周': '1 week',
'1 周': '1 week',
'资源配置': 'Resource Configuration',
'实时状态': 'Live Status',
'连接信息': 'Connection Info',
'管理链接': 'Management Link',
'NAT 管理': 'NAT Management',
'快照': 'Snapshots',
'系统': 'System',
'全部类型': 'All types',
'全部系统': 'All systems',
'全部状态': 'All statuses',
'类型筛选': 'Type filter',
'系统筛选': 'System filter',
'状态筛选': 'Status filter',
'内网': 'Private IP',
'内网 IP': 'Private IP',
'策略封禁': 'Policy Blocked',
'已封禁': 'Blocked',
'已到期': 'Expired',
'识别码': 'Identifier',
'CPU 累计时间': 'CPU Total Time',
'创建时间': 'Created At',
'网络速率': 'Network Speed',
'IO 速度': 'IO Speed',
'下行带宽': 'Download Bandwidth',
'上行带宽': 'Upload Bandwidth',
'读取 IO': 'Read IO',
'写入 IO': 'Write IO',
'下行带宽 (Mbps)': 'Download Bandwidth (Mbps)',
'上行带宽 (Mbps)': 'Upload Bandwidth (Mbps)',
'读取 IO (MB/s)': 'Read IO (MB/s)',
'写入 IO (MB/s)': 'Write IO (MB/s)',
'下行带宽 (Mbps0=不限制)': 'Download Bandwidth (Mbps, 0=unlimited)',
'上行带宽 (Mbps0=不限制)': 'Upload Bandwidth (Mbps, 0=unlimited)',
'读取 IO (MB/s0=不限制)': 'Read IO (MB/s, 0=unlimited)',
'写入 IO (MB/s0=不限制)': 'Write IO (MB/s, 0=unlimited)',
'限速占用': 'Limit Usage',
'支持独立限制上行/下行带宽和读/写 I/O 操作。': 'Supports independent upload/download bandwidth limits and read/write I/O limits.',
'支持独立限制上行/下行带宽和读/写 I/O 操作。network_bw_mbps 与 io_speed_mbps 为旧版对称限制兼容别名,建议新对接使用 network_down_mbps、network_up_mbps、io_read_mbps、io_write_mbps。': 'Supports independent upload/download bandwidth limits and read/write I/O limits. network_bw_mbps and io_speed_mbps are deprecated symmetric compatibility aliases. New integrations should use network_down_mbps, network_up_mbps, io_read_mbps, and io_write_mbps.',
'支持独立限制下行/上行带宽和读取/写入 I/O。未传字段保持原值,显式传 0 表示该方向不限速;network_bw_mbps 与 io_speed_mbps 为旧版对称限制兼容别名。': 'Supports independent download/upload bandwidth limits and read/write I/O limits. Omitted fields keep their current values, and explicitly passing 0 makes that direction unlimited. network_bw_mbps and io_speed_mbps are deprecated symmetric compatibility aliases.',
'月流量': 'Monthly Traffic',
'统计信息': 'Statistics',
'CPU 使用率': 'CPU Usage',
'内存使用': 'Memory Usage',
'网络流量': 'Network Traffic',
'磁盘IO': 'Disk IO',
'磁盘 IO': 'Disk IO',
'负载': 'Load',
'平均': 'Average',
'峰值': 'Peak',
'容量': 'Capacity',
'累计': 'Total',
'读': 'Read',
'写': 'Write',
'入': 'In',
'出': 'Out',
'运行中': 'Running',
'已停止': 'Stopped',
'已完成': 'Completed',
'等待中': 'Pending',
'执行中': 'Running',
'未知': 'Unknown',
'必要': 'Required',
'可选': 'Optional',
'用户名': 'Username',
'密码': 'Password',
'输入用户名': 'Enter username',
'输入密码': 'Enter password',
'登录': 'Log in',
'登录中...': 'Logging in...',
'用户名或密码错误': 'Incorrect username or password',
'访问码或密码错误': 'Incorrect access code or password',
'登录失败,请检查用户名和密码': 'Login failed. Check your username and password.',
'Authentication required': 'Authentication required',
'Administrator permission required': 'Administrator permission required',
'Method not allowed': 'Method not allowed',
'Invalid request body': 'Invalid request body',
'Invalid credentials': 'Invalid credentials',
'Access denied': 'Access denied',
'Access denied to this container': 'Access denied to this container',
'Container not found': 'Container not found',
'Template not found': 'Template not found',
'Template is required': 'Template is required',
'Template is not enabled or downloaded': 'Template is not enabled or downloaded',
'Container name is required': 'Container name is required',
'Container created successfully': 'Container created successfully',
'Password changed successfully': 'Password changed successfully',
'SSL settings saved': 'SSL settings saved',
'Save SSL settings failed': 'Save SSL settings failed',
'Task deleted': 'Task deleted',
'Snapshot deleted': 'Snapshot deleted',
'Snapshot restored': 'Snapshot restored',
'Security check completed': 'Security check completed',
'当前密码不正确': 'Current password is incorrect',
'密码不正确': 'Password is incorrect',
'新密码至少 6 位': 'New password must be at least 6 characters',
'用户名至少 3 位': 'Username must be at least 3 characters',
'密码加密失败': 'Failed to hash password',
'保存配置失败': 'Failed to save configuration',
'密码修改成功': 'Password changed successfully',
'用户名修改成功': 'Username changed successfully',
'容器已到期,不允许此操作': 'Container has expired. This action is not allowed.',
'容器管理登录': 'Container Access Login',
'操作失败': 'Action failed',
'错误': 'Error',
'保存失败': 'Save failed',
'重装失败': 'Reinstall failed',
'密码重置失败': 'Password reset failed',
'端口配额已满': 'Port quota reached',
'输入错误': 'Input error',
'请输入有效的内部端口': 'Enter a valid internal port',
'密码长度必须为 8-64 位': 'Password length must be 8-64 characters',
'密码不能包含空白字符': 'Password cannot contain whitespace',
'密码至少需要包含字母': 'Password must contain at least one letter',
'密码至少需要包含数字': 'Password must contain at least one number',
'密码格式不正确': 'Invalid password format',
'策略临时封禁': 'Temporarily blocked by policy',
'虚拟机被策略临时封禁,暂不能执行操作。': 'This VM is temporarily blocked by policy and cannot perform actions.',
'确定要删除容器': 'Delete container',
'吗?此操作不可撤销。': '? This action cannot be undone.',
'容器名称不能包含空格': 'Container name cannot contain spaces',
'该容器名称已存在': 'Container name already exists',
'请填写容器名称并选择系统模板': 'Enter a container name and select a system template',
'资源配置有误': 'Invalid resource configuration',
'请按红色提示修改 vCPU、内存或磁盘配置': 'Fix the vCPU, memory, or disk fields marked in red',
'创建失败': 'Create failed',
'创建新容器': 'Create New Container',
'创建步骤': 'Creation steps',
'基础信息': 'Basics',
'镜像选择': 'Image',
'网络配置': 'Network',
'预览清单': 'Review',
'基础信息有误': 'Invalid basic information',
'请填写有效且未被占用的容器名称': 'Enter a valid, available container name',
'KVM 磁盘': 'KVM Disk',
'请选择镜像': 'Select an image',
'请选择用于创建容器的系统镜像': 'Select the system image used to create the container',
'网络配置有误': 'Invalid network configuration',
'请至少启用一种网络连接方式': 'Enable at least one network connection mode',
'NAT 端口配置有误': 'Invalid NAT port configuration',
'自动分配': 'Auto assign',
'个端口': 'ports',
'局域网': 'LAN',
'未配置网络': 'No network configured',
'创建数量': 'Count',
'自动选择': 'Automatic',
'镜像与登录': 'Image and Login',
'镜像默认': 'Image default',
'自动生成密码': 'Auto-generated password',
'子用户可用镜像': 'Sub-user Images',
'主要网络': 'Primary Network',
'上一步': 'Back',
'下一步': 'Next',
'确认创建': 'Create',
'批量创建数量': 'Batch Count',
'虚拟化架构': 'Virtualization',
'LXC 容器': 'LXC Container',
'KVM 虚拟机': 'KVM VM',
'系统模板': 'System Template',
'搜索名称、ID、UUID、IP': 'Search name, ID, UUID, IP',
'带宽 (Mbps)': 'Bandwidth (Mbps)',
'双向统计': 'Total In+Out',
'入/出分离': 'Separate In/Out',
'GB (0=不限制)': 'GB (0=unlimited)',
'入站 (GB)': 'Inbound (GB)',
'出站 (GB)': 'Outbound (GB)',
'NAT 端口映射数量': 'NAT Port Mapping Count',
'子用户快照上限': 'Sub-user Snapshot Limit',
'到期时间': 'Expiration Time',
'不选择则长期有效;选择日期后,到期会自动关机。': 'Leave blank for no expiration. If a date is selected, the container will shut down automatically when it expires.',
'创建中...': 'Creating...',
'请输入 vCPU': 'Enter vCPU',
'内存 (MB)': 'Memory (MB)',
'磁盘 (GB)': 'Disk (GB)',
'IO 速度 (MB/s)': 'IO Speed (MB/s)',
'将创建': 'Will create',
'暂无可用的': 'No available',
'不能小于': 'Cannot be less than',
'不能大于': 'Cannot be greater than',
'KVM vCPU 必须是整数': 'KVM vCPU must be an integer',
'请输入内存': 'Enter memory',
'请输入磁盘': 'Enter disk',
'轮换失败': 'Rotation failed',
'获取操作日志失败': 'Failed to load audit logs',
'获取登录日志失败': 'Failed to load login logs',
'暂无子用户': 'No sub-users',
'容器名称': 'Container Name',
'最后登录': 'Last Login',
'从未登录': 'Never logged in',
'查看密码': 'View Password',
'查看操作日志': 'View Audit Logs',
'查看登录日志': 'View Login Logs',
'轮换密码': 'Rotate Password',
'轮换中...': 'Rotating...',
'用户': 'User',
'未保存,请轮换生成新密码': 'Not saved. Rotate to generate a new password.',
'操作时间': 'Action Time',
'登录时间': 'Login Time',
'登录 IP': 'Login IP',
'请输入当前密码以确认修改': 'Enter current password to confirm changes',
'至少填写新密码或新用户名中的一项': 'Enter at least a new password or a new username',
'用户名已修改': 'Username changed',
'用户名修改失败': 'Username change failed',
'密码已修改': 'Password changed',
'密码修改失败': 'Password change failed',
'下次登录生效': 'Takes effect at next login',
'修改失败': 'Change failed',
'账号、安全证书与登录日志': 'Account, certificates, and login logs',
'SSL 设置已保存,服务正在重启。稍后请用新的协议重新打开面板。': 'SSL settings saved. The service is restarting. Reopen the panel with the new protocol shortly.',
'SSL 设置已保存,重启 clicd 服务后生效。': 'SSL settings saved. Restart the clicd service to apply them.',
'SSL 设置保存失败': 'Failed to save SSL settings',
'纯 IP 证书需要服务器安装 Certbot 5.4+,且验证时 80 端口必须能被 Let’s Encrypt 访问。IP 证书是短有效期证书,certbot 需要保持自动续签。': 'Pure IP certificates require Certbot 5.4+ on the server, and port 80 must be reachable by Lets Encrypt during validation. IP certificates are short-lived, so certbot auto-renewal must remain enabled.',
'自签证书可以加密面板和 VNC,但浏览器会提示证书不受信任;证书快到期时系统会自动重新签发。': 'Self-signed certificates can encrypt the panel and VNC, but browsers will show an untrusted certificate warning. The system will renew them automatically before expiration.',
'上传来源还没有保存证书,请粘贴证书和私钥后保存。': 'No certificate has been saved for the uploaded source. Paste the certificate and private key, then save.',
'当前来源还没有保存证书,保存 SSL 设置时会自动生成或申请。': 'No certificate has been saved for the current source. It will be generated or requested when SSL settings are saved.',
'暂无容器': 'No containers',
'暂无快照': 'No snapshots',
'暂无操作日志': 'No audit logs',
'暂无登录日志': 'No login logs',
'暂无登录记录': 'No login records',
'暂无 NAT4 端口映射': 'No NAT4 port mappings',
'暂无 IPv6 地址分配': 'No IPv6 assignments',
'暂无可分配 IPv6 前缀': 'No allocatable IPv6 prefixes',
'暂无镜像': 'No images',
'暂无数据': 'No data',
'容器': 'Container',
'名称': 'Name',
'状态': 'Status',
'剩余时间': 'Time Left',
'配置': 'Config',
'镜像': 'Image',
'内存': 'Memory',
'磁盘': 'Disk',
'流量': 'Traffic',
'操作': 'Actions',
'类型': 'Type',
'创建者': 'Creator',
'管理员密码': 'Admin Password',
'SSH 密码': 'SSH Password',
'SSH 地址': 'SSH Address',
'RDP 地址': 'RDP Address',
'VNC 端口': 'VNC Port',
'点击隐藏': 'Click to hide',
'点击显示': 'Click to show',
'编辑资源限制': 'Edit resource limits',
'编辑流量限制': 'Edit traffic limit',
'修改到期时间': 'Change expiration time',
'新 SSH 密码': 'New SSH Password',
'生成随机密码': 'Generate random password',
'密码已修改成功': 'Password changed successfully',
'修改中...': 'Changing...',
'确认修改': 'Confirm Change',
'容器不存在': 'Container not found',
'容器未运行,请先开机': 'Container is not running. Start it first.',
'VNC 控制台暂不可用,请确认 KVM 虚拟机已开机并刷新页面': 'VNC console is unavailable. Make sure the KVM VM is running and refresh the page.',
'虚拟机被策略临时封禁': 'VM temporarily blocked by policy',
'虚拟机被策略临时封禁,连接信息暂不可用。': 'This VM is temporarily blocked by policy. Connection info is unavailable.',
'已达到管理员分配的 NAT 端口配额。': 'The NAT port quota assigned by the administrator has been reached.',
'保存端口映射失败': 'Failed to save port mapping',
'删除端口映射失败': 'Failed to delete port mapping',
'删除映射': 'Delete Mapping',
'确定要删除这条映射规则吗?': 'Delete this mapping rule?',
'快照配额已满': 'Snapshot quota reached',
'已达到管理员设置的快照配额,请先删除旧快照。': 'The snapshot quota set by the administrator has been reached. Delete old snapshots first.',
'拍摄快照': 'Take Snapshot',
'拍摄快照需要先关机,完成后会自动重启容器': 'Taking a snapshot requires shutdown first. The container will restart automatically afterward',
'是否继续?': 'Continue?',
'创建快照失败': 'Failed to create snapshot',
'参数错误': 'Invalid parameters',
'自动快照周期最低是 1 天一次。': 'The minimum automatic snapshot interval is once per day.',
'定时快照失败': 'Scheduled snapshot failed',
'保存快照配额失败': 'Failed to save snapshot quota',
'删除快照失败': 'Failed to delete snapshot',
'恢复快照失败': 'Failed to restore snapshot',
'确定恢复到': 'Restore to',
'当前容器数据会被覆盖。': 'Current container data will be overwritten.',
'确定删除': 'Delete',
'的快照吗?': 'snapshot?',
'新建快照': 'New Snapshot',
'定时设置': 'Schedule Settings',
'定时快照': 'Scheduled Snapshot',
'处理中...': 'Processing...',
'快照数量:': 'Snapshot count:',
'子用户配额:': 'Sub-user quota:',
'定时状态:': 'Schedule status:',
'下次执行:': 'Next run:',
'未开启': 'Off',
'已开启': 'On',
'每': 'Every',
'执行': 'run',
'子用户每台容器快照上限': 'Sub-user snapshot limit per container',
'自动快照周期': 'Automatic snapshot interval',
'天': 'days',
'小时': 'hours',
'分钟': 'minutes',
'秒': 'seconds',
'大小': 'Size',
'手动': 'Manual',
'定时': 'Scheduled',
'时间': 'Time',
'设备': 'Device',
'结果': 'Result',
'地址': 'Address',
'前缀': 'Prefix',
'出口网卡': 'Uplink',
'宿主地址': 'Host Address',
'协议': 'Protocol',
'说明': 'Description',
'端口': 'Port',
'容器端口': 'Container Port',
'宿主机端口': 'Host Port',
'容器 IPv4': 'Container IPv4',
'IPv6 地址': 'IPv6 Address',
'IPv6 前缀': 'IPv6 Prefix',
'可分配 IPv6 前缀': 'Allocatable IPv6 Prefixes',
'编辑前缀': 'Edit Prefixes',
'添加 IPv6 前缀': 'Add IPv6 Prefix',
'保存前缀': 'Save Prefixes',
'服务商面板里的额外 IPv6 段不会自动出现在网卡里,请把可分配的前缀手动填入这里,例如 2401:b60:26:5e::2/64。': 'Extra IPv6 prefixes from the provider panel will not automatically appear on the NIC. Enter allocatable prefixes here manually, for example 2401:b60:26:5e::2/64.',
'LXC 名称': 'LXC Name',
'快照时间': 'Snapshot Time',
'删除快照': 'Delete Snapshot',
'全局快照列表': 'Global snapshot list',
'主机名': 'Hostname',
'操作系统': 'Operating System',
'内核': 'Kernel',
'生成时间': 'Generated At',
'系统概览': 'System Overview',
'公网与路由': 'Public Network & Routing',
'内存条': 'Memory Modules',
'硬盘与健康': 'Disks & Health',
'网卡': 'Network Interfaces',
'显卡': 'GPUs',
'环境支持': 'Environment Support',
'服务管理器 systemd/OpenRC': 'Service Manager systemd/OpenRC',
'LXC 创建工具': 'LXC Create Tool',
'LXC 启动工具': 'LXC Start Tool',
'iptables 网络规则': 'iptables Network Rules',
'iproute2 网络工具': 'iproute2 Network Tool',
'conntrack 安全扫描': 'conntrack Security Scan',
'QEMU/KVM 虚拟机': 'QEMU/KVM Virtualization',
'KVM cloud-init ISO 工具': 'KVM cloud-init ISO Tool',
'ISO 备用工具': 'ISO Fallback Tool',
'硬盘健康检测': 'Disk Health Check',
'Certbot 证书工具 >= 5.4': 'Certbot Certificate Tool >= 5.4',
'/dev/kvm 硬件虚拟化': '/dev/kvm Hardware Virtualization',
'IPv4 转发': 'IPv4 Forwarding',
'lxcfs 服务': 'lxcfs Service',
'libvirt 服务': 'libvirt Service',
'正在探测宿主机环境...': 'Probing host environment...',
'暂未获取到宿主机信息': 'No host information available',
'面板资源状态与容器概览': 'Panel resource status and container overview',
'宿主机资源状态与容器概览': 'Host resource status and container overview',
'存储管理': 'Storage Management',
'只显示已挂载磁盘;勾选后,对应功能可以选择该磁盘保存数据。': 'Only mounted disks are shown. Enable a content type to make that disk available to the corresponding feature.',
'空间分布': 'Space Distribution',
'用于存储': 'Storage Usage',
'未检测到已挂载磁盘': 'No mounted disks detected',
'镜像缓存': 'Image Cache',
'备份': 'Backups',
'默认盘': 'Default Disk',
'设为': 'Set as',
'CLICD 其他': 'Other CLICD Data',
'非 CLICD': 'Non-CLICD Data',
'可用空间': 'Free Space',
'存储配置已保存': 'Storage settings saved',
'保存存储配置失败': 'Failed to save storage settings',
'任务队列、账号、安全证书与访问记录': 'Task queue, account, certificates, and access records',
'任务队列、账号、访问控制、安全证书与访问记录': 'Task queue, account, access control, certificates, and access records',
'设置分类': 'Settings categories',
'访问来源': 'Access Sources',
'访问来源策略': 'Access Source Policy',
'限制可访问面板、登录和 API 的来源地址': 'Restrict source addresses that can access the panel, login, and APIs',
'启用访问白名单': 'Enable Access Allowlist',
'关闭后不限制访问来源': 'No source restrictions when disabled',
'关闭访问白名单': 'Disable Access Allowlist',
'允许的 IP / CIDR': 'Allowed IP / CIDR',
'可信代理 IP / CIDR': 'Trusted Proxy IP / CIDR',
'仅可信代理可提供真实客户端地址;未使用反向代理时留空': 'Only trusted proxies may supply the real client address. Leave empty without a reverse proxy.',
'当前识别来源': 'Detected Source',
'直接连接来源': 'Direct Connection Source',
'保存访问策略': 'Save Access Policy',
'面板访问来源策略已保存并立即生效': 'Panel access source policy saved and applied immediately',
'面板访问来源限制已关闭': 'Panel access source restriction disabled',
'面板访问来源策略保存失败': 'Failed to save panel access source policy',
'面板访问来源策略': 'Panel Access Source Policy',
'更新面板访问来源策略': 'Update Panel Access Source Policy',
'WebSSH 访问': 'WebSSH Access',
'账号设置': 'Account Settings',
'当前用户名': 'Current Username',
'新用户名,留空则不修改': 'New Username, leave blank to keep unchanged',
'新密码,留空则不修改': 'New Password, leave blank to keep unchanged',
'当前密码,验证身份': 'Current Password, for verification',
'至少 3 位': 'At least 3 characters',
'至少 6 位': 'At least 6 characters',
'输入当前密码以确认修改': 'Enter current password to confirm changes',
'保存修改': 'Save Changes',
'总并发上限': 'Total Concurrency Limit',
'减少并发': 'Decrease concurrency',
'增加并发': 'Increase concurrency',
'保存队列设置': 'Save Queue Settings',
'任务队列并发设置已保存并立即生效': 'Task queue concurrency saved and applied immediately',
'任务队列设置保存失败': 'Failed to save task queue settings',
'SSL 证书': 'SSL Certificate',
'启用 HTTPS / WSS': 'Enable HTTPS / WSS',
'IP / 域名': 'IP / Domain',
'服务器公网 IP 或域名': 'Server public IP or domain',
'邮箱,可选': 'Email, optional',
'自签证书': 'Self-signed Certificate',
'上传证书': 'Uploaded Certificate',
'证书 PEM / fullchain.pem': 'Certificate PEM / fullchain.pem',
'私钥 PEM / privkey.pem': 'Private Key PEM / privkey.pem',
'保存后自动重启服务并立即生效': 'Restart service automatically after saving',
'保存中...': 'Saving...',
'保存 SSL 设置': 'Save SSL Settings',
'WebSSH Origin 白名单': 'WebSSH Origin Allowlist',
'允许的 Origin': 'Allowed Origins',
'当前面板来源:': 'Current panel origin:',
'默认允许当前面板来源和本机回环来源;额外域名每行填写一个完整 Origin。': 'The current panel origin and local loopback origins are allowed by default. Add one full Origin per line.',
'保存 Origin 白名单': 'Save Origin Allowlist',
'Origin 白名单已保存': 'Origin allowlist saved',
'Origin 白名单保存失败': 'Failed to save Origin allowlist',
'登录日志': 'Login Logs',
'首页': 'First',
'上一页': 'Previous',
'下一页': 'Next',
'末页': 'Last',
'搜索端口/容器...': 'Search port/container...',
'搜索地址/容器...': 'Search address/container...',
'NAT4 端口': 'NAT4 Ports',
'NAT4 端口分配': 'NAT4 Port Allocation',
'IPv6 地址分配': 'IPv6 Address Allocation',
'剩余端口 / 端口总数': 'Available Ports / Total Ports',
'剩余地址 / 地址总数': 'Available Addresses / Total Addresses',
'已分配': 'Allocated',
'充足': 'Enough',
'容器列表': 'Container List',
'刷新列表': 'Refresh list',
'创建容器': 'Create Container',
'点击"创建容器"开始': 'Click "Create Container" to start',
'创建中': 'Creating',
'批量创建': 'Batch Create',
'导入容器': 'Import Container',
'重置密码': 'Reset Password',
'WebSSH': 'WebSSH',
'WebVNC': 'WebVNC',
'发送 Ctrl+Alt+Del': 'Send Ctrl+Alt+Del',
'重新连接': 'Reconnect',
'关闭': 'Close',
'已连接': 'Connected',
'连接中...': 'Connecting...',
'已断开': 'Disconnected',
'连接失败': 'Connection Failed',
'正在连接 KVM VNC 控制台...': 'Connecting to KVM VNC console...',
'WebVNC 已断开': 'WebVNC disconnected',
'下载': 'Download',
'下载中': 'Downloading',
'启用': 'Enable',
'停用': 'Disable',
'已启用': 'Enabled',
'未启用': 'Disabled',
'系统镜像': 'System Images',
'安全检查': 'Security Check',
'告警列表': 'Alert List',
'自动关机已开': 'Auto-stop on',
'自动关机已关': 'Auto-stop off',
'暂无安全告警': 'No security alerts',
'严重': 'Critical',
'高': 'High',
'中': 'Medium',
'低': 'Low',
'管理员': 'Admin',
'子用户': 'Sub User',
'公网 IPv4': 'Public IPv4',
'IPv4 地址': 'IPv4 Addresses',
'IPv4 段': 'IPv4 Prefixes',
'IPv6 段': 'IPv6 Prefixes',
'网关': 'Gateways',
'CPU 架构': 'CPU Architecture',
'CPU 虚拟化指令': 'CPU Virtualization Flags',
'CPU 核显': 'Integrated GPU',
'运行能力': 'Runtime Capability',
'KVM 嵌套虚拟化': 'KVM Nested Virtualization',
'支持': 'Supported',
'未检测到': 'Not detected',
'检测到': 'Detected',
'有效': 'Valid',
'已过期或未生效': 'Expired or not active',
'是': 'Yes',
'否': 'No',
'开启': 'On',
'已关闭': 'Off',
'自动': 'Auto',
'默认': 'Default',
'全部': 'All',
'无': 'None',
'根目录': 'Root',
'版本': 'Version',
'当前': 'Current',
'最近': 'Recent',
'来源': 'Source',
'目标': 'Target',
'描述': 'Description',
'备注': 'Notes',
'搜索容器...': 'Search containers...',
'搜索镜像...': 'Search images...',
'搜索日志...': 'Search logs...',
'复制成功': 'Copied',
'复制失败': 'Copy failed',
'请稍后重试': 'Please try again later',
'请稍后重试。': 'Please try again later.',
'开机中...': 'Starting...',
'关机中...': 'Stopping...',
'重启中...': 'Restarting...',
'删除中...': 'Deleting...',
'重装中...': 'Reinstalling...',
'开机中': 'Starting',
'关机中': 'Stopping',
'重启中': 'Restarting',
'删除中': 'Deleting',
'重装中': 'Reinstalling',
'正在初始化': 'Initializing',
'容器总数': 'Total Containers',
'驱动/速率': 'Driver / Speed',
'支持 KVM + LXC': 'KVM + LXC supported',
'仅支持 LXC': 'LXC only',
'未满足运行环境': 'Runtime requirements not met',
'健康': 'Healthy',
'异常': 'Abnormal',
'核显': 'Integrated',
'独显': 'Discrete',
'获取镜像列表失败': 'Failed to load image list',
'下载失败': 'Download failed',
'删除失败': 'Delete failed',
'取消失败': 'Cancel failed',
'删除镜像': 'Delete Image',
'确定要删除该镜像缓存吗?删除后需要重新下载才能使用。': 'Delete this image cache? You must download it again before using it.',
'取消下载并清理临时文件': 'Cancel download and clean temporary files',
'删除镜像缓存': 'Delete image cache',
'取消中': 'Cancelling',
'取消中...': 'Cancelling...',
'下载中...': 'Downloading...',
'阶段:': 'Stage:',
'转换中': 'Converting',
'端口扫描': 'Port scan',
'横向扫描': 'Lateral scan',
'暴力破解': 'Brute force',
'DDoS/大规模扫描': 'DDoS / large-scale scan',
'垃圾邮件': 'Spam',
'恶意软件': 'Malware',
'挖矿连接': 'Mining connection',
'代理/VPN/Tor': 'Proxy / VPN / Tor',
'UDP反射放大': 'UDP reflection amplification',
'高危': 'High risk',
'中危': 'Medium risk',
'低危': 'Low risk',
'告警自动关机': 'Auto shutdown on alerts',
'相关连接记录': 'Related Connection Records',
'查看相关记录': 'View related records',
'告警原始记录': 'Raw Alert Record',
'正在加载连接记录...': 'Loading connection records...',
'暂无可用连接记录。历史告警对应的 conntrack 记录可能已经过期。': 'No connection records available. Conntrack records for historical alerts may have expired.',
'源地址': 'Source Address',
'目标地址': 'Target Address',
'源IP': 'Source IP',
'次数': 'Count',
'等级': 'Severity',
'总览与只读': 'Overview & Read-only',
'路由信息': 'Routing Info',
'IPv6 状态': 'IPv6 Status',
'镜像列表': 'Image List',
'查看容器': 'View Container',
'开关机/重启': 'Power / Restart',
'重装系统': 'Reinstall OS',
'资源/到期': 'Resources / Expiration',
'流量管理': 'Traffic Management',
'端口映射': 'Port Mappings',
'分配 IPv6': 'Assign IPv6',
'快照与终端': 'Snapshots & Terminal',
'查看快照': 'View Snapshots',
'创建快照': 'Create Snapshot',
'恢复快照': 'Restore Snapshot',
'计划/配额': 'Schedule / Quota',
'平台管理': 'Platform Management',
'下载镜像': 'Download Image',
'启停镜像': 'Enable / Disable Image',
'安全数据': 'Security Data',
'安全扫描': 'Security Scan',
'安全设置': 'Security Settings',
'Swap 信息': 'Swap Info',
'Swap 管理': 'Swap Management',
'Key 列表': 'Key List',
'创建 Key': 'Create Key',
'更新 Key': 'Update Key',
'删除 Key': 'Delete Key',
'总览': 'Overview',
'NAT/IPv4/IPv6 路由': 'NAT / IPv4 / IPv6 Routing',
'NAT/IPv6 路由': 'NAT / IPv6 Routing',
'更新公网 IPv4/IPv6 池': 'Update Public IPv4 / IPv6 Pools',
'扫描公网 IPv4 段': 'Scan Public IPv4 Prefixes',
'公网 IPv4/IPv6 池': 'Public IPv4 / IPv6 Pools',
'任务队列': 'Task Queue',
'任务列表': 'Task List',
'操作记录': 'audit records',
'子用户列表': 'Sub-user List',
'创建子用户': 'Create Sub-user',
'更新子用户': 'Update Sub-user',
'管理员接口': 'Admin API',
'控制面板统计': 'Dashboard Stats',
'立即安全检查': 'Run Security Check',
'路由配置': 'Routing Configuration',
'返回响应样例': 'Response Example',
'请求参数': 'Request Parameters',
'响应字段': 'Response Fields',
'接口地址': 'Endpoint',
'请求方法': 'Method',
'权限范围': 'Scopes',
'绑定容器': 'Bound Containers',
'全部容器': 'All Containers',
'全权限': 'Full Access',
'取消全权限': 'Remove Full Access',
'禁用这个 Key': 'Disable this key',
'过期时间': 'Expiration Time',
'永不过期': 'Never expires',
'IP 白名单': 'IP Whitelist',
'密钥名称': 'Key Name',
'删除任务': 'Delete Task',
'容器详情': 'Container Details',
'资源用量': 'Resource Usage',
'流量统计': 'Traffic Stats',
'重置流量': 'Reset Traffic',
'调整流量限制': 'Adjust Traffic Limit',
'调整资源限制': 'Adjust Resource Limit',
'重置 SSH 密码': 'Reset SSH Password',
'端口与快照': 'Ports & Snapshots',
'随机可用端口': 'Random Available Port',
'添加端口映射': 'Add Port Mapping',
'更新端口映射': 'Update Port Mapping',
'删除端口映射': 'Delete Port Mapping',
'获取防火墙设置': 'Get Firewall Settings',
'更新防火墙设置': 'Update Firewall Settings',
'快照总览': 'Snapshot Overview',
'容器快照': 'Container Snapshots',
'计划快照': 'Scheduled Snapshots',
'快照配额': 'Snapshot Quota',
'模板列表': 'Template List',
'镜像管理列表': 'Image Management List',
'第三方镜像': 'Third-party Image',
'下载第三方 KVM 镜像': 'Download Third-party KVM Image',
'下载第三方 LXC 镜像': 'Download Third-party LXC Image',
'支持 tar、tar.gz、tar.xz、tar.zst 格式的 Linux rootfs': 'Supports Linux rootfs archives in tar, tar.gz, tar.xz, and tar.zst formats',
'移除第三方镜像': 'Remove Third-party Image',
'第三方镜像已移除': 'Third-party image removed',
'移除第三方镜像失败': 'Failed to remove third-party image',
'第三方镜像已添加,下载任务已启动': 'Third-party image added and download started',
'镜像格式必须与所选无人值守安装模板匹配': 'The image format must match the selected unattended installation template',
'无人值守安装模板': 'Unattended Installation Template',
'镜像名称': 'Image Name',
'版本 / 代号': 'Version / Codename',
'镜像下载地址': 'Image Download URL',
'镜像来源、版本或用途': 'Image source, version, or purpose',
'用于校验下载文件完整性': 'Used to verify download integrity',
'添加并下载': 'Add and Download',
'正在添加...': 'Adding...',
'添加第三方镜像失败': 'Failed to add third-party image',
'添加第三方 KVM 镜像源': 'Add Third-party KVM Image Source',
'移除第三方 KVM 镜像源': 'Remove Third-party KVM Image Source',
'添加第三方 LXC/KVM 镜像源': 'Add Third-party LXC/KVM Image Source',
'移除第三方 LXC/KVM 镜像源': 'Remove Third-party LXC/KVM Image Source',
'请填写名称、发行版、版本和下载地址': 'Enter the name, distribution, version, and download URL',
'SHA-256 必须是 64 位十六进制字符串': 'SHA-256 must be a 64-character hexadecimal string',
'安装 ISO': 'Installation ISO',
'校验中': 'Validating',
'取消镜像下载': 'Cancel Image Download',
'启用/禁用镜像': 'Enable / Disable Image',
'安全连接日志': 'Security Connection Logs',
'安全汇总': 'Security Summary',
'更新安全设置': 'Update Security Settings',
'调整 Swap': 'Adjust Swap',
'批量开关机/删除/重装': 'Batch power/delete/reinstall',
'账号与日志': 'Account & Logs',
'API Key 列表': 'API Key List',
'创建 API Key': 'Create API Key',
'更新 API Key': 'Update API Key',
'删除 API Key': 'Delete API Key',
'30分钟': '30 minutes',
'1小时': '1 hour',
'1天': '1 day',
'切换中文': 'Switch to Chinese',
'WebSSH ticket 创建失败,请重新登录后再试': 'Failed to create WebSSH ticket. Log in again and retry.',
'WebSSH ticket 为空,请重新登录后再试': 'WebSSH ticket is empty. Log in again and retry.',
'WebSSH 连接失败,请确认容器已运行且 SSH 服务可用': 'WebSSH connection failed. Make sure the container is running and SSH is available.',
'WebVNC ticket 创建失败,请重新登录后再试': 'Failed to create WebVNC ticket. Log in again and retry.',
'WebVNC ticket 为空,请重新登录后再试': 'WebVNC ticket is empty. Log in again and retry.',
'WebVNC 连接已断开,请确认虚拟机正在运行且 VNC 控制台可用': 'WebVNC disconnected. Make sure the VM is running and the VNC console is available.',
'VNC 安全协商失败': 'VNC security negotiation failed',
'当前 VNC 控制台要求密码,暂不支持自动输入': 'This VNC console requires a password. Automatic input is not supported yet.',
'删除容器': 'Delete Container',
'WebSSH 票据': 'WebSSH Ticket',
'WebVNC 票据': 'WebVNC Ticket',
'容器列表(兼容 POST 写法)': 'Container List (compatible POST form)',
'调整到期时间': 'Adjust Expiration Time',
'批量创建容器': 'Batch Create Containers',
'创建 WebSSH 票据': 'Create WebSSH Ticket',
'创建 WebVNC 票据': 'Create WebVNC Ticket',
'创建子用户链接': 'Create Sub-user Link',
'轮换子用户密码': 'Rotate Sub-user Password',
'子用户操作日志': 'Sub-user Audit Logs',
'子用户登录日志': 'Sub-user Login Logs',
'确定删除这个 API Key 吗?': 'Delete this API Key?',
'管理外部调用凭据、权限范围与平台 API 文档': 'Manage external credentials, permission scopes, and platform API docs',
'新的 API Key 已生成': 'New API Key generated',
'已复制': 'Copied',
'加载中...': 'Loading...',
'暂无 API Key': 'No API Keys',
'权限': 'Permissions',
'限制': 'Limits',
'最后使用': 'Last Used',
'已禁用': 'Disabled',
'不限 IP': 'Any IP',
'从未使用': 'Never used',
'API 文档': 'API Docs',
'查看使用范例': 'View examples',
'Python 使用范例': 'Python example',
'编辑 API Key': 'Edit API Key',
'CI/CD、计费系统、自动化脚本': 'CI/CD, billing systems, automation scripts',
'SWAP 已调整为 16384 MB': 'SWAP adjusted to 16384 MB',
'***60秒有效票据***': '***60-second valid ticket***',
'Linux 创建支持 ssh_auth_mode=auto_password|password|key;公网 IPv4、IPv6 与 NAT 可通过 assign_nat、assign_ipv4、assign_ipv6 组合使用。': 'Linux container creation supports ssh_auth_mode=auto_password|password|key. Public IPv4, IPv6, and NAT can be configured with assign_nat, assign_ipv4, and assign_ipv6.',
'重装支持 ssh_auth_mode=keep|auto_password|password|keykeep 仅用于重装,未传 SSH 字段时保持原有行为。': 'Reinstall supports ssh_auth_mode=keep|auto_password|password|key. keep is only for reinstall requests; if SSH fields are omitted, the existing behavior is kept.',
'批量创建的单个 containers[] 项支持与 POST /api/v1/containers 相同的网络和 SSH 认证字段。': 'Each containers[] item in batch creation supports the same network and SSH authentication fields as POST /api/v1/containers.',
'action=reinstall 时可追加 template_id、ssh_auth_mode、ssh_password、ssh_public_key;其他 action 会忽略这些重装字段。': 'When action=reinstall, you can include template_id, ssh_auth_mode, ssh_password, and ssh_public_key. Other actions ignore these reinstall fields.',
'更新公网地址池需要 routing:write;已分配给容器的地址不能从池中移除。': 'Updating public address pools requires routing:write. Addresses already assigned to containers cannot be removed from the pool.',
'扫描公网 IPv4 段需要 routing:writeverify=true 时会尝试校验地址可用性。': 'Scanning public IPv4 prefixes requires routing:write. When verify=true, the API also attempts to check address availability.',
'WebVNC 仅适用于 KVM 虚拟机;LXC 容器会返回 VNC console is only available for KVM VMs。': 'WebVNC only applies to KVM VMs; LXC containers return "VNC console is only available for KVM VMs".',
'该接口会进入任务队列,请随后调用 GET /api/v1/tasks 查看执行状态。': 'This API enters the task queue. Call GET /api/v1/tasks afterward to check execution status.',
'样例中的密钥、密码和票据已脱敏;创建类接口的完整密钥只在创建响应中出现一次。': 'Keys, passwords, and tickets in examples are masked. Full secrets from create APIs appear only once in the creation response.',
'编辑月流量限制': 'Edit Monthly Traffic Limit',
'流量统计模式': 'Traffic Accounting Mode',
'双向合并统计': 'Combined In+Out',
'入站/出站分开统计': 'Separate Inbound/Outbound',
'月流量上限 (GB0=不限制)': 'Monthly traffic limit (GB, 0=unlimited)',
'入站上限 (GB0=不限制)': 'Inbound limit (GB, 0=unlimited)',
'出站上限 (GB0=不限制)': 'Outbound limit (GB, 0=unlimited)',
'请输入 8-64 位,至少包含字母和数字': 'Enter 8-64 characters, including at least letters and numbers',
'Linux LXC/KVM 修改 root SSH 密码通常无需重启;KVM 需要虚拟机运行且 guest agent 或 SSH 可用。': 'Changing the root SSH password for Linux LXC/KVM usually does not require a restart. KVM requires the VM to be running and guest agent or SSH to be available.',
'退出全屏': 'Exit Fullscreen',
'全屏显示': 'Fullscreen',
'全屏': 'Fullscreen',
'修改': 'Change',
'关闭定时': 'Disable Schedule',
'执行时间': 'Run Time',
'NAT 端口管理': 'NAT Port Management',
'添加映射': 'Add Mapping',
'端口配额:': 'Port quota:',
'已达到管理员分配的 NAT 端口配额': 'The NAT port quota assigned by the administrator has been reached',
'修改端口映射': 'Edit Port Mapping',
'重装系统会删除容器内所有数据,请谨慎操作。': 'Reinstalling the OS will delete all data in the container. Proceed carefully.',
'选择新系统模板': 'Select New System Template',
'确认重装': 'Confirm Reinstall',
'当前:': 'Current:',
'新到期日期(留空为长期有效)': 'New expiration date (leave blank for no expiration)',
'vCPU 核数': 'vCPU Cores',
'网络速率 (Mbps0=不限制)': 'Network speed (Mbps, 0=unlimited)',
'IO 速度 (MB/s0=不限制)': 'IO speed (MB/s, 0=unlimited)',
'磁盘容量不支持动态修改。修改后运行中的容器会立即应用新的 cgroup 限制。': 'Disk capacity cannot be changed dynamically. Running containers apply the new cgroup limits immediately.',
'恢复': 'Restore',
'全部 (ALL)': 'All (ALL)',
'外部端口': 'External Port',
'默认同内部': 'Same as internal by default',
'随机空闲端口': 'Random Free Port',
'随机': 'Random',
'内部端口': 'Internal Port',
'例如 80': 'e.g. 80',
'暂无端口映射': 'No port mappings',
'默认 SSH 映射不能删除': 'Default SSH mapping cannot be deleted',
'入站 (RX)': 'Inbound (RX)',
'(不限制)': '(unlimited)',
'出站 (TX)': 'Outbound (TX)',
'已用': 'Used',
'重置': 'Reset',
'执行中...': 'Running...',
'点击': 'Click',
'开始': 'Start',
'没有匹配的容器': 'No matching containers',
'显示': 'Showing',
'初始化失败': 'Initialization failed',
'初始化完成': 'Initialization complete',
'排队等待': 'Queued',
'当前阶段': 'Current Stage',
'准备初始化环境': 'Preparing initialization environment',
'检查模板与创建参数': 'Checking template and creation settings',
'下载模板并创建基础文件系统': 'Downloading template and creating root filesystem',
'复制容器数据到存储磁盘': 'Copying container data to storage disk',
'创建容量限制磁盘并复制 rootfs': 'Creating quota disk and copying rootfs',
'配置 CPU、内存与网络限制': 'Configuring CPU, memory, and network limits',
'分配 IPv4、IPv6 与 NAT 端口': 'Allocating IPv4, IPv6, and NAT ports',
'保存容器配置': 'Saving container configuration',
'写入容器网络配置': 'Writing container network configuration',
'安装并配置 SSH 服务': 'Installing and configuring SSH',
'检测并预配置 SSH 服务': 'Detecting and preconfiguring SSH',
'转换非特权容器文件权限': 'Converting unprivileged container permissions',
'设置容器登录凭据': 'Setting container login credentials',
'启动容器并等待网络就绪': 'Starting container and waiting for network',
'启动虚拟机并等待网络就绪': 'Starting VM and waiting for network',
'检查 KVM 镜像与创建参数': 'Checking KVM image and creation settings',
'选择虚拟机存储磁盘': 'Selecting VM storage disk',
'分配 IPv4 与 IPv6 地址': 'Allocating IPv4 and IPv6 addresses',
'创建 Windows 虚拟磁盘': 'Creating Windows virtual disk',
'生成 Windows 自动应答配置': 'Generating Windows unattended setup',
'创建 KVM 系统磁盘': 'Creating KVM system disk',
'生成 cloud-init 初始化配置': 'Generating cloud-init configuration',
'注册 KVM 虚拟机': 'Registering KVM virtual machine',
'分配并配置 NAT 端口': 'Allocating and configuring NAT ports',
'保存虚拟机配置': 'Saving virtual machine configuration',
'处理中': 'Processing',
'未知系统': 'Unknown system',
'处理失败': 'Failed',
'暂无任务': 'No tasks',
'取消任务': 'Cancel Task',
'硬件、网络、磁盘健康与运行环境探测报告': 'Hardware, network, disk health, and runtime environment report',
'运行状态': 'Runtime Status',
'未检测到内存条明细,可能缺少 dmidecode 或权限受限': 'No memory module details detected. dmidecode may be missing or permissions may be limited.',
'插槽': 'Slot',
'频率': 'Frequency',
'厂商': 'Vendor',
'型号/序列号': 'Model / Serial',
'未检测到硬盘': 'No disks detected',
'虚拟磁盘': 'Virtual Disk',
'不支持': 'Unsupported',
'虚拟磁盘,真实 SMART/寿命/通电数据需在物理宿主机查看': 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.',
'虚拟Disk,真实 SMART/Lifetime/Power-on数据需在物理宿主机View': 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.',
'型号': 'Model',
'挂载点': 'Mount Point',
'寿命': 'Lifetime',
'通电': 'Power-on',
'读取': 'Reads',
'写入': 'Writes',
'命令数': 'Commands',
'擦写': 'Erase Count',
'未检测到网卡': 'No network interfaces detected',
'未检测到显卡': 'No GPUs detected',
'驱动': 'Driver',
'管理 LXC / KVM 系统镜像,下载后的镜像才能用于创建容器/虚拟机。': 'Manage LXC / KVM system images. Downloaded images can be used to create containers/VMs.',
'已下载': 'Downloaded',
'LXC 容器镜像': 'LXC Container Images',
'KVM 虚拟机镜像': 'KVM VM Images',
'发行版': 'Distribution',
'架构': 'Architecture',
'禁用': 'Disable',
'可用': 'Available',
'未下载': 'Not downloaded',
'中文': 'Chinese',
'宿主机分配给 LXC 的 NAT4 端口和 IPv6 地址': 'NAT4 ports and IPv6 addresses assigned to LXC by the host',
'确认删除容器': 'Delete container',
'剩余地址 / 地址总数 ·': 'Available Addresses / Total Addresses ·',
'结果 ': 'Result ',
'告警列表 (': 'Alert List (',
'当前证书:': 'Current certificate:',
'到期时间:': 'Expires:',
'证书路径:': 'Certificate path:',
'最近错误:': 'Last error:',
'1 天': '1 day',
'3 天': '3 days',
'7 天': '7 days',
'14 天': '14 days',
'10 / 页': '10 / page',
'20 / 页': '20 / page',
'50 / 页': '50 / page',
'全局快照列表,共': 'Global snapshot list, total',
'容器分配的子用户列表,共': 'Sub-user list assigned to containers, total',
'防火墙': 'Firewall',
'防火墙设置': 'Firewall Settings',
'独立 IPv4': 'Dedicated IPv4',
'添加规则': 'Add Rule',
'启用后默认拒绝所有入站和出站流量,仅放行下方规则': 'When enabled, all inbound and outbound traffic is blocked by default. Only the rules below are allowed.',
'已启用,未匹配规则的流量将被拒绝': 'Enabled. Traffic that does not match a rule will be denied.',
'已启用,未匹配规则的流量将被放行': 'Enabled. Traffic that does not match a rule will be allowed.',
'未启用时不接管该容器流量': 'Disabled. Container traffic is not managed by this firewall.',
'默认动作': 'Default Action',
'没有命中下方规则时如何处理': 'How to handle traffic that does not match the rules below',
'未匹配拒绝': 'Deny unmatched',
'未匹配放行': 'Allow unmatched',
'网络范围': 'Network Scope',
'可配置:': 'Configurable: ',
'可配置:IPv4(公网 IPv4)。 IPv4 规则覆盖独立公网 IPv4。': 'Configurable: IPv4 (Public IPv4). IPv4 rules apply to the dedicated public IPv4.',
'可配置:IPv4NAT)。 IPv4 规则覆盖IPv4 NAT 端口映射。 NAT 入站端口按容器内部端口匹配,不是宿主机公网端口。': 'Configurable: IPv4 (NAT). IPv4 rules apply to IPv4 NAT port mappings. NAT inbound ports are matched by the container internal port, not the host public port.',
'可配置:IPv6。 IPv6 规则覆盖该容器已分配的 IPv6 地址。': 'Configurable: IPv6. IPv6 rules apply to the IPv6 addresses assigned to this container.',
'可配置:IPv4(公网 IPv4)、IPv6。 IPv4 规则覆盖独立公网 IPv4。 IPv6 规则覆盖该容器已分配的 IPv6 地址。': 'Configurable: IPv4 (Public IPv4), IPv6. IPv4 rules apply to the dedicated public IPv4. IPv6 rules apply to the IPv6 addresses assigned to this container.',
'可配置:IPv4NAT)、IPv6。 IPv4 规则覆盖IPv4 NAT 端口映射。 NAT 入站端口按容器内部端口匹配,不是宿主机公网端口。 IPv6 规则覆盖该容器已分配的 IPv6 地址。': 'Configurable: IPv4 (NAT), IPv6. IPv4 rules apply to IPv4 NAT port mappings. NAT inbound ports are matched by the container internal port, not the host public port. IPv6 rules apply to the IPv6 addresses assigned to this container.',
'当前容器未分配 IPv4 NAT、独立公网 IPv4 或 IPv6,暂无可配置网络。': 'This container has no IPv4 NAT, dedicated public IPv4, or IPv6 assigned, so no firewall network can be configured.',
'当前容器没有可配置的 NAT、公网 IPv4 或 IPv6': 'This container has no configurable NAT, public IPv4, or IPv6',
'当前容器没有可配置网络': 'This container has no configurable network',
'IPv4 规则覆盖独立公网 IPv4。': 'IPv4 rules apply to the dedicated public IPv4.',
'IPv4 规则覆盖IPv4 NAT 端口映射。': 'IPv4 rules apply to IPv4 NAT port mappings.',
'NAT 入站端口按容器内部端口匹配,不是宿主机公网端口。': 'NAT inbound ports are matched by the container internal port, not the host public port.',
'IPv6 规则覆盖该容器已分配的 IPv6 地址。': 'IPv6 rules apply to the IPv6 addresses assigned to this container.',
'IPv4(公网 IPv4': 'IPv4 (Public IPv4)',
'IPv4NAT': 'IPv4 (NAT)',
'全部网络': 'All Networks',
'方向': 'Direction',
'网络': 'Network',
'来源/目标 IP': 'Source / Destination IP',
'动作': 'Action',
'入站': 'Inbound',
'出站': 'Outbound',
'任意': 'Any',
'放行': 'Allow',
'拒绝': 'Deny',
'暂无防火墙规则': 'No firewall rules',
'防火墙设置已保存并应用': 'Firewall settings saved and applied',
'保存防火墙设置失败': 'Failed to save firewall settings',
'编辑规则': 'Edit Rule',
'入站 (Inbound)': 'Inbound',
'出站 (Outbound)': 'Outbound',
'留空为全部端口,支持: 22 | 80,443 | 8000-9000': 'Leave empty for all ports. Supports: 22 | 80,443 | 8000-9000',
'入站填容器服务端口;留空为全部端口,支持: 22 | 80,443 | 8000-9000': 'For inbound rules, enter the container service port. Leave empty for all ports. Supports: 22 | 80,443 | 8000-9000',
'出站填远端目标端口;留空为全部端口,支持: 22 | 80,443 | 8000-9000': 'For outbound rules, enter the remote destination port. Leave empty for all ports. Supports: 22 | 80,443 | 8000-9000',
'NAT 入站填容器内部端口,例如公网 22023 -> 容器 22,这里填 22': 'For NAT inbound rules, enter the container internal port. For example, public 22023 -> container 22 means enter 22 here.',
'端口仅适用于 TCP/UDP': 'Ports only apply to TCP/UDP',
'如: 22 或 80,443 或 8000-9000': 'e.g. 22 or 80,443 or 8000-9000',
'当前协议不使用端口': 'This protocol does not use ports',
'来源 IP': 'Source IP',
'目标 IP': 'Destination IP',
'留空为任意 IP,支持 CIDR: 192.168.1.0/24': 'Leave empty for any IP. Supports CIDR: 192.168.1.0/24',
'留空为任意 IPv4,支持 CIDR: 192.168.1.0/24': 'Leave empty for any IPv4. Supports CIDR: 192.168.1.0/24',
'留空为任意 IPv6,支持 CIDR: 2001:db8::/64': 'Leave empty for any IPv6. Supports CIDR: 2001:db8::/64',
'留空为任意 IP,支持 IPv4/IPv6 CIDR': 'Leave empty for any IP. Supports IPv4/IPv6 CIDR',
'如: 192.168.1.0/24': 'e.g. 192.168.1.0/24',
'如: 2001:db8::/64': 'e.g. 2001:db8::/64',
'如: 192.168.1.0/24 或 2001:db8::/64': 'e.g. 192.168.1.0/24 or 2001:db8::/64',
'放行 (ACCEPT)': 'Allow (ACCEPT)',
'拒绝 (DROP)': 'Deny (DROP)',
'规则描述': 'Rule description',
'兼容旧请求:default_action 可不传,不传时保留现有策略;rule.network 可不传,不传按 ipv4 处理。default_action: DROP=未命中规则时拒绝, ACCEPT=未命中规则时放行。network: ipv4=IPv4 NAT/公网 IPv4, ipv6=IPv6, all=同时应用到 IPv4 和 IPv6。NAT 入站规则的 port 填容器内端口,不是宿主机公网端口。': 'Backward compatible: default_action is optional; if omitted, the existing policy is kept. rule.network is optional; if omitted, it is treated as ipv4. default_action: DROP=deny unmatched traffic, ACCEPT=allow unmatched traffic. network: ipv4=IPv4 NAT/public IPv4, ipv6=IPv6, all=apply to both IPv4 and IPv6. For NAT inbound rules, port is the container internal port, not the host public port.',
'登录方式': 'SSH Auth Method',
'保留当前密码': 'Keep current password',
'生成新密码': 'Generate new password',
'自定义密码': 'Custom password',
'生成密码': 'Generate password',
'不限速': 'Unlimited',
'下': 'Down',
'不限': 'Unlimited',
'/ 上': '/ Up',
'请选择登录方式': 'Select a login method',
'未检测到可分配公网 IPv4': 'No allocatable public IPv4 detected',
'使用': 'Use',
'正在检测 IPv6 前缀...': 'Checking IPv6 prefixes...',
'公网 NAT': 'Public NAT',
'不分配 NAT 端口': 'Do not assign NAT ports',
'未检测到可分配 IPv6 前缀;宿主机只有 /128 单个 IPv6 地址,不能分配给容器。': 'No allocatable IPv6 prefix was detected. The host only has a single /128 IPv6 address, which cannot be assigned to containers.',
'宿主机检测到 IPv6 前缀,但 IPv6 出站连通性测试失败。': 'The host detected an IPv6 prefix, but the outbound IPv6 connectivity test failed.',
'个可分配地址': 'allocatable addresses',
'将分配': 'Will assign',
'请勾选任意一个可用网络': 'Select at least one available network',
'局域网 IPv4 配置有误': 'Invalid LAN IPv4 configuration',
'请填写有效的 IPv4 地址、子网掩码和网关': 'Enter a valid IPv4 address, subnet mask, and gateway',
'未配置存储': 'Storage not configured',
'请先在存储管理中为': 'In Storage Management, enable storage for',
'开启至少一块存储磁盘': 'Enable at least one storage disk',
'登录方式有误': 'Invalid login method',
'至': 'to',
'当前宿主机不支持 KVM': 'The current host does not support KVM',
'系统镜像,请先在「镜像管理」中下载镜像模板。': 'system images available. Download an image template from Images first.',
'存储磁盘': 'Storage Disk',
'自动选择(默认盘优先,空间不足自动切换)': 'Automatic selection (prefer default disk and switch when space is insufficient)',
'尚未开启': 'Not enabled',
'存储,当前无法创建。': 'storage is not enabled, so creation is currently unavailable.',
'去开启': 'Configure Now',
'默认勾选当前系统;取消后,子用户也不能重装该系统。': 'The current system is selected by default. Clearing it also prevents sub-users from reinstalling that system.',
'局域网 DHCP': 'LAN DHCP',
'macvlan 独立局域网 IP': 'Independent LAN IP via macvlan',
'未检测到可用上联网卡': 'No available uplink interface detected',
'DHCP 自动获取': 'Obtain automatically via DHCP',
'子网掩码': 'Subnet Mask',
'不选则长期有效': 'Leave blank for no expiration',
'均': 'Avg',
'/ 峰': '/ Peak',
'到期': 'Expires',
'未分配': 'Unassigned',
'下行': 'Download',
'上行': 'Upload',
'修改公网 IP 分配': 'Change Public IP Assignment',
'尚未开启快照存储,无法新建或启用定时快照。': 'Snapshot storage is not enabled. New and scheduled snapshots are unavailable.',
'新建快照存储磁盘': 'Storage Disk for New Snapshots',
'仅影响手动新建快照;定时快照使用默认磁盘。': 'Only affects manually created snapshots. Scheduled snapshots use the default disk.',
'在': 'at',
'IPv4 规则覆盖': 'IPv4 rules cover',
'独立公网 IPv4': 'independent public IPv4',
'公网 IP 分配': 'Public IP Assignment',
'修改后会重放端口映射、SNAT 和防火墙规则。': 'Changing assignments reapplies port mappings, SNAT, and firewall rules.',
'随机数量': 'Random Count',
'没有可选择的公网 IPv4,请先到路由管理配置 IPv4 池。': 'No public IPv4 addresses are available. Configure the IPv4 pool in Routing first.',
'独立 IPv6': 'Independent IPv6',
'自定义地址必须落在路由管理配置的 IPv6 前缀内。': 'Custom addresses must be within an IPv6 prefix configured in Routing.',
'未分配 IPv4 NAT 端口配额': 'No IPv4 NAT port quota assigned',
'已达到管理员分配的 IPv4 NAT 端口配额': 'The administrator-assigned IPv4 NAT port quota has been reached',
'不分配': 'Do Not Assign',
'随机分配': 'Random Allocation',
'自定义': 'Custom',
'SSH Key 格式不正确': 'Invalid SSH key format',
'公网 IP 分配失败': 'Public IP assignment failed',
'请检查地址是否可用或已被占用': 'Check whether the address is available or already in use',
'未分配 IPv4 NAT': 'IPv4 NAT not assigned',
'该容器未分配 IPv4 NAT 端口配额。': 'This container has no IPv4 NAT port quota.',
'未配置快照存储': 'Snapshot storage not configured',
'请先在存储管理中为快照开启至少一块存储磁盘。': 'Enable at least one snapshot storage disk in Storage Management first.',
'个月': 'months',
'个任务': 'tasks',
'剩余': 'Remaining',
'磨损': 'Wear',
'启停': 'Power Cycles',
'线程': 'threads',
'块硬盘': 'disks',
'个进程': 'processes',
'虚拟': 'Virtual',
'尚未开启镜像缓存存储,无法下载新镜像。': 'Image cache storage is not enabled, so new images cannot be downloaded.',
'请先在存储管理中开启镜像缓存存储': 'Enable image cache storage in Storage Management first',
'正在检查存储配置...': 'Checking storage configuration...',
'池内': 'In Pool',
'范围': 'Range',
'条映射': 'mappings',
'模式': 'Mode',
'NAT4、公网 IPv4 池和 IPv6 地址分配': 'NAT4, public IPv4 pool, and IPv6 address assignment',
'编辑 NAT4 范围': 'Edit NAT4 Range',
'起始端口': 'Start Port',
'结束端口': 'End Port',
'NAT4 范围必须是 1-65535,且起始端口不能大于结束端口': 'The NAT4 range must be within 1-65535, and the start port cannot exceed the end port',
'保存 NAT4 范围失败': 'Failed to save NAT4 range',
'剩余 / 总数': 'Remaining / Total',
'由局域网 DHCP 分配': 'Assigned by LAN DHCP',
'局域网 DHCP 分配': 'LAN DHCP Assignments',
'暂无局域网 DHCP 分配': 'No LAN DHCP assignments',
'公网 IPv4 池': 'Public IPv4 Pool',
'编辑 IP 池': 'Edit IP Pool',
'暂未配置公网 IPv4 池': 'No public IPv4 pool configured',
'掩码': 'Mask',
'分配给': 'Assigned To',
'空闲': 'Free',
'编辑 IPv4 池': 'Edit IPv4 Pool',
'IPv4 网关不能为空': 'IPv4 gateway is required',
'IPv4 地址不能为空': 'IPv4 address is required',
'保存 IPv4 池失败': 'Failed to save IPv4 pool',
'打开容器': 'Open Container',
'IPv4 池内暂无地址': 'No addresses in the IPv4 pool',
'添加 IPv4': 'Add IPv4',
'检测到的 IPv6 前缀': 'Detected IPv6 Prefixes',
'暂无 IPv6 前缀': 'No IPv6 prefixes',
'IPv6 网卡不能为空': 'IPv6 interface is required',
'本机': 'Local',
'暂无 IPv4 NAT 映射': 'No IPv4 NAT mappings',
'运行时名称': 'Runtime Name',
'客户机 IPv4': 'Guest IPv4',
'宿主 IPv4': 'Host IPv4',
'宿主端口': 'Host Port',
'客户机端口': 'Guest Port',
'大量': 'Large',
'的快照吗?此操作不可恢复。': ' snapshot? This action cannot be undone.',
'· 默认勾选当前系统,取消后将禁止重装该系统': ' · the current system is selected by default; clearing it prevents reinstalling that system',
'暂无已下载并启用的镜像': 'No downloaded and enabled images',
'已选择': 'Selected',
'加载失败': 'Loading failed',
'请填写 SSH 公钥': 'Enter an SSH public key',
'SSH 公钥长度不能超过 8192 字符': 'The SSH public key cannot exceed 8192 characters',
'SSH 公钥只能填写一行': 'The SSH public key must be on one line',
'SSH 公钥格式不正确': 'Invalid SSH public key format',
}
const artifactPatterns: RegExp[] = [
/Back\s*列表/,
/SearchName、ID、UUID、IP/,
/All(Type|Status|系统)/,
/AutoStop\s*已[开关]/,
/暂\s*(None|无)\s*Security Alerts/,
/Memory\s*使用/,
/网络\s*Traffic/,
/实时\s*Status/,
/Create\s*Time/,
/长期\s*Valid/,
/虚拟Disk/,
/宿主机View/,
/SMART\/Lifetime\/Power-on数据/,
]
const replacements: Array<[RegExp, string]> = [
[/Back\s*列表/g, 'Back to list'],
[/虚拟Disk,真实 SMART\/Lifetime\/Power-on数据需在物理宿主机View/g, 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.'],
[/虚拟\s*Disk,真实 SMART\/Lifetime\/Power-on数据需在物理宿主机\s*View/g, 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.'],
[/真实 SMART\/Lifetime\/Power-on数据需在物理宿主机View/g, 'Real SMART, lifetime, and power-on data must be checked on the physical host'],
[/Search\s*名称、ID、UUID、IP/g, 'Search name, ID, UUID, IP'],
[/All\s*类型/g, 'All types'],
[/All\s*系统/g, 'All systems'],
[/All\s*状态/g, 'All statuses'],
[/AllType/g, 'All types'],
[/All系统/g, 'All systems'],
[/AllStatus/g, 'All statuses'],
[/SearchName、ID、UUID、IP/g, 'Search name, ID, UUID, IP'],
[/AutoStop\s*已关/g, 'Auto-stop off'],
[/AutoStop\s*已开/g, 'Auto-stop on'],
[/暂\s*None\s*Security Alerts/g, 'No security alerts'],
[/暂\s*无\s*Security Alerts/g, 'No security alerts'],
[/WebVNC\s*初始化失败(.+)$/g, 'WebVNC initialization failed$1'],
[/确定要删除容器\s*(.+?)\s*吗?此操作不可撤销。/g, 'Delete container $1? This action cannot be undone.'],
[/确定要删除容器\s*(.+?)\s*吗?此操作不可撤销。/g, 'Delete container $1? This action cannot be undone.'],
[/拍摄快照需要先关机,完成后会自动重启容器\s*(.+?)。是否继续?/g, 'Taking a snapshot requires shutdown first. Container $1 will restart automatically afterward. Continue?'],
[/确定删除\s*(.+?)\s*的快照吗?/g, 'Delete snapshot $1?'],
[/确定恢复到\s*(.+?)\s*的快照吗?当前容器数据会被覆盖。/g, 'Restore to snapshot $1? Current container data will be overwritten.'],
[/到期\s*(.+)$/g, 'Expires $1'],
[/支持\s*\((.+?)\)/g, 'Supported ($1)'],
[/下载中\s*(.+)$/g, 'Downloading $1'],
[/结果\s*(.+)$/g, 'Result $1'],
[/磨损\s*(.+)$/g, 'Wear $1'],
[/擦写\s*(.+)$/g, 'Erase $1'],
[/启停\s*(.+)$/g, 'Power cycles $1'],
[/每\s*(.+)$/g, 'Every $1'],
[/已开启,每\s*(.+)$/g, 'Enabled, every $1'],
[/告警列表\s*\((\d+)\)/g, 'Alert List ($1)'],
[/共\s*(\d+)\s*个\s*Container/g, 'Total $1 containers'],
[/共\s*(\d+)\s*个\s*容器/g, 'Total $1 containers'],
[/共\s*(\d+)\s*个\s*任务/g, 'Total $1 tasks'],
[/(\d+)\s*个前缀,(\d+)\s*个地址已分配/g, '$1 prefixes, $2 addresses assigned'],
[/共\s*(\d+)\s*条/g, 'Total $1'],
[/共\s*(\d+)\s*个/g, 'Total $1 items'],
[/,筛选后\s*(\d+)\s*个/g, ', filtered $1 items'],
[/,已选\s*(\d+)\s*个/g, ', selected $1 items'],
[/第\s*(\d+)\/(\d+)\s*页/g, 'Page $1/$2'],
[/显示\s*(\d+)-(\d+)\s*\/\s*(\d+)/g, 'Showing $1-$2 / $3'],
[/显示\s*(\d+)-(\d+),共\s*(\d+)\s*条/g, 'Showing $1-$2 of $3'],
[/搜索\s*"([^"]+)"\s*结果\s*(\d+)\s*条,/g, 'Search "$1" returned $2 results, '],
[/搜索\s*"([^"]+)"\s*结果\s*(\d+)\s*个地址/g, 'Search "$1" returned $2 addresses, '],
[/(\d+)\s*个/g, '$1 items'],
[/(\d+)\s*条/g, '$1 records'],
[/1\s*核\b/g, '1 core'],
[/(\d+)\s*核/g, '$1 cores'],
[/(\d+)\s*线程/g, '$1 threads'],
[/已用/g, 'used'],
[/未设置\s*Traffic\s*限制/g, 'No traffic limit set'],
[/Memory\s*使用/g, 'Memory Usage'],
[/网络\s*Traffic/g, 'Network Traffic'],
[/实时\s*Status/g, 'Live Status'],
[/Expiration Time\s*长期\s*Valid/g, 'Expiration Time No expiration'],
[/长期\s*Valid/g, 'No expiration'],
[/Create\s*Time/g, 'Created At'],
[/CPU\s*累计\s*Time/g, 'CPU Total Time'],
[/(\d+(?:\.\d+)?)\s*cores\s*\/\s*(\d+)\s*核/g, '$1 cores / $2 cores'],
[/(\d+)\s*核\/(.+?)\/(\d+)\s*GB/g, '$1 cores / $2 / $3 GB'],
[/(\d+)\s*\/\s*页/g, '$1 / page'],
[/到期时间:/g, 'Expires: '],
[/证书路径:/g, 'Certificate path: '],
[/最近错误:/g, 'Last error: '],
[/当前证书:/g, 'Current certificate: '],
[/第\s*(\d+)\s*页/g, 'Page $1'],
[/入\s*([^/]+)\s*\/\s*出\s*([^]+),累计\s*(.+)$/g, 'In $1 / Out $2, total $3'],
[/入\s*([^/]+)\s*\/\s*出\s*([^]+),限速占用\s*([^]+),累计\s*(.+)$/g, 'In $1 / Out $2, limit usage $3, total $4'],
[/下\s*([^/]+)\s*\/\s*上\s*(.+)$/g, 'Down $1 / Up $2'],
[/下行\s*([^/]+)\s*\/\s*上行\s*(.+)$/g, 'Download $1 / Upload $2'],
[/读取\s*([^/]+)\s*\/\s*写入\s*(.+)$/g, 'Read $1 / Write $2'],
[/读\s*([^/]+)\s*\/\s*写\s*([^]+),累计\s*([^]+),容量\s*(.+)$/g, 'Read $1 / Write $2, total $3, capacity $4'],
[/读\s*([^/]+)\s*\/\s*写\s*([^]+),限速占用\s*([^]+),累计\s*([^]+),容量\s*(.+)$/g, 'Read $1 / Write $2, limit usage $3, total $4, capacity $5'],
[/(.+?),筛选后\s*(\d+)\s*items/g, '$1, filtered $2 items'],
[/(.+?),已选\s*(\d+)\s*items/g, '$1, selected $2 items'],
[/将创建\s*(\d+)\s*个容器:(.+?)\s*至\s*(.+)$/g, 'Will create $1 containers: $2 to $3'],
[/暂无可用的\s*(KVM|LXC)\s*系统镜像,请先在「镜像管理」中下载镜像模板。/g, 'No available $1 system images. Download image templates in Images first.'],
[/不能小于\s*(.+)$/g, 'Cannot be less than $1'],
[/不能大于\s*(.+)$/g, 'Cannot be greater than $1'],
[/^(.+?)\s*-\s*操作日志$/g, '$1 - Audit Logs'],
[/^(.+?)\s*-\s*登录日志$/g, '$1 - Login Logs'],
[/^(.+?)。下次登录生效$/g, '$1. Takes effect at next login'],
[/阶段:(.+)$/g, 'Stage: $1'],
[/正在初始化:(.+)$/g, 'Initializing: $1'],
[/\$\{days\}天/g, '${days} days'],
[/\$\{hours\}小时/g, '${hours} hours'],
[/\$\{hours\}\s*小时/g, '${hours} hours'],
[/\$\{Math\.floor\(diff \/ 60000\)\}分钟/g, '${Math.floor(diff / 60000)} minutes'],
[/(\d+)分钟/g, '$1 minutes'],
[/(\d+)小时/g, '$1 hours'],
[/(\d+)\s*周/g, '$1 weeks'],
[/(\d+)天/g, '$1 days'],
[/确认删除容器\s*(.+?)\s*的快照吗?此操作不可恢复。/g, 'Delete the snapshot for container $1? This cannot be undone.'],
[/确定要删除容器\s*(.+?)\s*吗?此操作不可撤销。/g, 'Delete container $1? This action cannot be undone.'],
[/容器\s*(.+?)\s*已开机/g, 'Container $1 started'],
[/容器\s*(.+?)\s*已关机/g, 'Container $1 stopped'],
[/容器\s*(.+?)\s*已重启/g, 'Container $1 restarted'],
]
export function translateText(value: string): string {
if (!shouldTranslateText(value)) return value
const leading = value.match(/^\s*/)?.[0] || ''
const trailing = value.match(/\s*$/)?.[0] || ''
const body = value.trim()
if (!body) return value
if (exact[body]) return leading + exact[body] + trailing
let translated = body
for (const [pattern, replacement] of replacements) {
translated = translated.replace(pattern, replacement)
}
for (const [source, target] of Object.entries(exact).sort((a, b) => b[0].length - a[0].length)) {
translated = translated.split(source).join(target)
}
translated = cleanupTranslatedText(translated)
return leading + translated + trailing
}
export function shouldTranslateText(value: string): boolean {
return /[\u3400-\u9fff]/.test(value) || artifactPatterns.some((pattern) => pattern.test(value))
}
function cleanupTranslatedText(value: string): string {
return value
.replace(/虚拟Disk,真实 SMART\/Lifetime\/Power-on数据需在物理宿主机View/g, 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.')
.replace(/Virtual Disk,真实 SMART\/Lifetime\/Power-on数据需在物理Host View/g, 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.')
.replace(/Virtual Disk,真实 SMART\/Lifetime\/Power-on数据需在物理宿主机View/g, 'Virtual disk. Real SMART, lifetime, and power-on data must be checked on the physical host.')
.replace(/虚拟\s*Disk/g, 'Virtual disk')
.replace(/宿主机\s*View/g, 'physical host')
.replace(/Back\s*List/g, 'Back to list')
.replace(/Container\s*List/g, 'Container List')
.replace(/Snapshot\s*List/g, 'Snapshot List')
.replace(/All\s*Type/g, 'All types')
.replace(/All\s*Status/g, 'All statuses')
.replace(/All\s*System/g, 'All systems')
.replace(/AutoStop\s*Off/g, 'Auto-stop off')
.replace(/AutoStop\s*On/g, 'Auto-stop on')
.replace(/\s{2,}/g, ' ')
}