/** * 管理后台中英文文案。 * * 以中文原文作为 key 做映射:未收录的文案会原样返回, * 因此缺少翻译时不会出现空白,也不会影响功能。 */ export type AdminLang = 'zh' | 'en'; const EN: Record = { // 框架 '管理后台': 'Admin Console', 'COSMO 管理后台': 'COSMO Admin', '用户中心': 'Account Center', '账号': 'Account', '数据管理': 'Data', '平台管理': 'Platform', '概览': 'Overview', '个人资料': 'Profile', '返回首页': 'Back to Explorer', '退出登录': 'Sign out', '收起菜单': 'Collapse menu', '展开菜单': 'Expand menu', '语言切换': 'Language', '主题切换': 'Appearance', '浅色': 'Light', '深色': 'Dark', '管理员': 'Administrator', '普通用户': 'User', // 页面标题与说明 '控制台': 'Dashboard', '平台数据总览': 'Platform overview', '天体总数': 'Celestial bodies', '探测器': 'Probes', '注册用户': 'Registered users', '个': 'total', '人': 'users', '包含行星、卫星、探测器等全部登记天体': 'All registered bodies, including planets, moons and probes', 'NASA Horizons 实时位置追踪': 'Live positions from NASA Horizons', '包含管理员与普通用户': 'Includes administrators and regular users', '恒星系统': 'Star systems', '含太阳系与系外星系': 'Solar and exoplanetary systems', '火箭型号': 'Launch vehicles', '启用': 'Active', // 控制台内容面板 '即将开始的火箭发射任务': 'Upcoming launches', '暂无即将开始的发射任务': 'No upcoming launches', '30 天内': 'Next 30 days', '发射任务': 'Mission', '发射时间': 'Launch time', '型号': 'Vehicle', '系统状态': 'System status', '即将发生的天象': 'Upcoming events', '查看全部': 'View all', '暂无任务记录': 'No task records', '暂无即将发生的天象事件': 'No upcoming events', '数据截止日期': 'Data cutoff', 'Redis 缓存': 'Redis cache', '内存': 'Memory', '缓存命中率': 'Cache hit rate', '总查询': 'Queries', '累计命令数': 'Total commands', '个连接': 'clients', '数据库': 'Database', '张表': 'tables', '数据记录': 'Records', '位置数据': 'Positions', '资源文件': 'Uploads', '个文件': 'files', '已连接': 'Connected', '未连接': 'Disconnected', '任务': 'Task', '事件': 'Event', '类型': 'Type', '时间': 'Time', '天体数据管理': 'Celestial Bodies', '按恒星系统维护天体基础信息、显示资源与轨道数据': 'Maintain body data, resources and orbit data per star system', '恒星系统管理': 'Star Systems', '管理恒星系统及其包含的天体,太阳系不可删除': 'Manage star systems and their bodies. The Solar System cannot be deleted', '静态数据管理': 'Static Data', '星座、星系、星云、小行星带等静态天文数据(JSON)': 'Constellations, galaxies, nebulae and belts stored as JSON', '天体事件': 'Celestial Events', '来自 NASA 的接近、食、合、冲等天象事件': 'Approach, eclipse, conjunction and opposition events from NASA', '用户管理': 'Users', '查看平台注册用户、启用状态与角色,并可重置密码': 'Review registered users, status and roles; reset passwords', '火箭数据管理': 'Launch Vehicles', '发射模拟使用的运载火箭参数(质量、推力、几何尺寸与发射场)': 'Vehicle parameters used by the launch simulator', '系统任务': 'Tasks', '定时任务管理': 'Scheduled Jobs', '按 Cron 表达式周期性执行内置任务或自定义代码': 'Run built-in tasks or custom code on a Cron schedule', '系统设置': 'System Settings', '维护系统参数与缓存,修改后无需重启即可生效': 'Maintain system parameters and caches; changes apply without restart', 'NASA 数据下载': 'NASA Data Download', '按天补全天体的位置数据(00:00 UTC),下载任务可在“系统任务”中查看进度': 'Backfill daily positions (00:00 UTC); progress appears under Tasks', '维护头像、姓名、邮箱,并在此修改登录密码': 'Update avatar, name, email and login password', '我的天体': 'My Bodies', '查看已关注天体及其相关天象事件': 'Followed bodies and their events', '我的设备': 'My Devices', '管理接入当前账号的终端,可绑定新设备或解除绑定': 'Terminals linked to your account; bind new devices or release them', '已绑定': 'Bound', '设备': 'Device', '未命名终端': 'Unnamed terminal', '连接状态': 'Connection', '在线': 'Online', '离线': 'Offline', '绑定时间': 'Bound at', '最后同步': 'Last sync', '绑定终端': 'Bind Terminal', '绑定终端设备': 'Bind a Terminal', '绑定': 'Bind', '确认解除绑定该终端?': 'Release this terminal?', '解绑后终端需重新配对才能继续同步数据': 'The terminal must be paired again before it can sync data', // 通用控件 '新增': 'New', '保存': 'Save', '取消': 'Cancel', '删除': 'Delete', '编辑': 'Edit', '详情': 'Details', '刷新': 'Refresh', '操作': 'Actions', '状态': 'Status', '暂无数据': 'No data', '搜索...': 'Search…', // 表格列标题 'ID': 'ID', '用户': 'User', '邮箱': 'Email', '角色': 'Role', '最近登录': 'Last login', '注册时间': 'Registered', '事件标题': 'Event', '目标天体': 'Body', '事件类型': 'Event type', '事件时间': 'Event time', '距离 (AU)': 'Distance (AU)', '相对速度 (km/s)': 'Relative velocity (km/s)', '描述': 'Description', '来源': 'Source', '英文名': 'English name', '中文名': 'Chinese name', '所属系统': 'Star system', '资源配置': 'Resources', '系统名称': 'System', '主恒星': 'Host star', '距离': 'Distance', '光谱类型': 'Spectral type', '恒星参数': 'Stellar params', '恒星数量': 'Stars', '分类': 'Category', '数据 (JSON)': 'Data (JSON)', '排序': 'Order', '火箭': 'Vehicle', '制造方': 'Manufacturer', '发射场': 'Launch site', '总体尺寸': 'Size', '一级': 'Stage 1', '二级': 'Stage 2', '目标轨道': 'Target orbit', '任务类型': 'Task type', '进度': 'Progress', '创建时间': 'Created', '任务名称': 'Job name', '任务函数': 'Function', 'Cron 表达式': 'Cron expression', '上次执行': 'Last run', '参数键': 'Key', '名称': 'Label', '当前值': 'Value', '天体': 'Body', // 搜索占位 '搜索用户名 / 姓名 / 邮箱': 'Search username, name or email', '搜索事件标题 / 描述': 'Search event title or description', '搜索 ID / 英文名 / 中文名': 'Search ID, English or Chinese name', '搜索恒星系统名称...': 'Search star system name…', '搜索名称 / 分类': 'Search name or category', '搜索火箭名称 / 编码': 'Search vehicle name or code', '搜索任务名称 / 描述': 'Search job name or description', '搜索任务类型 / 描述 / 状态': 'Search task type, description or status', '搜索参数键 / 名称 / 分类': 'Search key, label or category', }; export function translate(text: string, lang: AdminLang): string { if (lang !== 'en') return text; return EN[text] ?? text; }