Files
likang 7e01147566
CI / typecheck + test + build (push) Has been cancelled
Initial commit: import VibeMake PCB Studio
2026-11-03 11:20:08 +08:00

1468 lines
65 KiB
TypeScript
Raw Permalink 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.
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 ZiroEDA and contributors.
// Modified by VibeMake for the built-in Chinese/English UI.
import { useSyncExternalStore } from 'react';
export type UiLanguage = 'zh-CN' | 'en';
const COMMON_SETTINGS_KEY = 'ziroeda.common';
const listeners = new Set<() => void>();
const PHRASES: Readonly<Record<string, string>> = {
'Back to VibeMake home': '返回 VibeMake 首页',
'About KiCad': '关于 KiCad',
'Set Language': '设置语言',
'List Hotkeys...': '快捷键列表...',
'New Project Folder': '新建项目文件夹',
'Create New Project': '创建新项目',
'Open Existing Project': '打开已有项目',
'Import Non-KiCad Project': '导入非 KiCad 项目',
'Import Non-KiCad Project...': '导入非 KiCad 项目...',
'Open Demo Project': '打开演示项目',
'New Jobset File...': '新建 Jobset 文件...',
'Open Jobset File...': '打开 Jobset 文件...',
'Open Text Viewer': '打开文本查看器',
'Manage Design Block Libraries...': '管理设计图块库...',
'Preferences...': '首选项...',
'Hotkey List': '快捷键列表',
Hotkey: '快捷键',
'Command (double-click to edit)': '命令(双击编辑)',
'Undo All Changes': '撤销所有更改',
'Undo all changes made so far in this dialog': '撤销在此对话框中所做的所有更改',
'Import Hotkeys...': '导入快捷键...',
'Import hotkey definitions from an external file, replacing the current values':
'从外部文件导入快捷键定义并替换当前设置',
'Copy 3D Image to Clipboard': '复制 3D 图像到剪贴板',
'Copy 3D image to clipboard': '将 3D 图像复制到剪贴板',
'3D Grid 10mm': '3D 网格 10mm',
'3D Grid 1mm': '3D 网格 1mm',
'3D Grid 2.5mm': '3D 网格 2.5mm',
'3D Grid 5mm': '3D 网格 5mm',
'No 3D Grid': '关闭 3D 网格',
'Export Image': '导出图像',
'Flip Board': '翻转电路板',
'Flip board view': '翻转电路板视图',
'Rotate X Clockwise': '绕 X 轴顺时针旋转',
'Rotate X clockwise': '绕 X 轴顺时针旋转',
'Rotate X Counterclockwise': '绕 X 轴逆时针旋转',
'Rotate X counterclockwise': '绕 X 轴逆时针旋转',
'Rotate Y Clockwise': '绕 Y 轴顺时针旋转',
'Rotate Y clockwise': '绕 Y 轴顺时针旋转',
'Rotate Y Counterclockwise': '绕 Y 轴逆时针旋转',
'Rotate Y counterclockwise': '绕 Y 轴逆时针旋转',
'Rotate Z Clockwise': '绕 Z 轴顺时针旋转',
'Rotate Z clockwise': '绕 Z 轴顺时针旋转',
'Rotate Z Counterclockwise': '绕 Z 轴逆时针旋转',
'Rotate Z counterclockwise': '绕 Z 轴逆时针旋转',
'Show Appearance Manager': '显示外观管理器',
'Show appearance manager': '显示外观管理器',
'Use orthographic projection': '使用正交投影',
'Use raytracing': '使用光线追踪',
'Render current view using Raytracing': '使用光线追踪渲染当前视图',
'Redraw view': '重绘视图',
'View Back': '后视图',
'View Bottom': '底视图',
'View Front': '前视图',
'View Top': '顶视图',
'Zoom Out': '缩小',
'Zoom out': '缩小',
'Zoom to fit': '缩放至适合窗口',
Developers: '开发者',
'Doc Writers': '文档撰写者',
Librarians: '库维护者',
Artists: '美术设计者',
Translators: '翻译者',
Packagers: '打包维护者',
License: '许可证',
'List Hotkeys': '快捷键列表',
Quit: '退出',
'45 Degree Crosshairs': '45 度十字光标',
'Display full-window crosshairs aligned at 45 and 135 degrees':
'显示与 45 度和 135 度对齐的全窗口十字光标',
'Add a circle': '添加圆',
'Add a pin': '添加引脚',
'Add a polygon': '添加多边形',
'Add a rectangle': '添加矩形',
'Add an arc': '添加圆弧',
'Annotate Automatically': '自动标注',
'Toggle automatic annotation of new symbols': '切换新符号的自动标注',
'Annotate Schematic': '标注原理图',
'Fill in schematic symbol reference designators': '填写原理图符号参考标号',
Attributes: '属性',
'Bulk Edit Symbol Fields': '批量编辑符号字段',
'Edit a table of fields from all symbols in the schematic': '编辑原理图中所有符号的字段表',
'Check duplicate and off-grid pins': '检查重复和偏离网格的引脚',
'Clear Net Highlighting': '清除网络高亮',
'Compare Symbol with Library': '将符号与库进行比较',
'Cycle Arc Editing Mode': '循环切换圆弧编辑模式',
'Draw Arcs': '绘制圆弧',
'Draw Bezier Curve': '绘制贝塞尔曲线',
'Draw Buses': '绘制总线',
'Draw Circles': '绘制圆',
'Draw Hierarchical Sheets': '绘制层次图纸',
'Draw Rectangles': '绘制矩形',
'Draw Rule Areas': '绘制规则区域',
'Draw Tables': '绘制表格',
'Draw Text Boxes': '绘制文本框',
'Edit pins in a table': '在表格中编辑引脚',
'Edit Reference Designator': '编辑参考标号',
'Edit Sheet Page Number': '编辑图纸页码',
'Edit Text & Graphics Properties': '编辑文本和图形属性',
'Generate Bill of Materials': '生成物料清单',
'Generate a bill of materials for the current schematic': '为当前原理图生成物料清单',
'Hierarchy Navigator': '层次导航器',
'Show/hide the schematic sheet hierarchy navigator': '显示/隐藏原理图图纸层次导航器',
'Highlight Nets': '高亮网络',
'Highlight wires and pins of a net': '高亮网络的导线和引脚',
'Import Graphics': '导入图形',
'Import Drawing Sheet': '导入图纸',
'Increment Annotations From': '标注编号起始值',
'Interactive delete': '交互式删除',
'Interactive Delete Tool': '交互式删除工具',
Lasso: '套索',
'Set selection mode to use polygon lasso': '将选择模式设为多边形套索',
'Leave Sheet': '离开图纸',
'Select item(s)': '选择项目',
'Show as mirror image': '显示为镜像',
'Show dcode numbers': '显示 D 码编号',
'Show lines in outline mode': '以轮廓模式显示线条',
'Show negative objects in ghost color': '使用幽灵色显示负片对象',
'Show polygons in outline mode': '以轮廓模式显示多边形',
'Switch between polar and cartesian coordinate systems': '切换极坐标和笛卡尔坐标系',
'Toggle inactive layers between normal and dimmed': '切换非活动图层的正常和变暗显示',
'Use small crosshairs aligned at 0 and 90 degrees': '使用与 0 度和 90 度对齐的小型十字光标',
'3D model': '3D 模型',
Common: '通用',
'Full-Window Crosshairs': '全窗口十字光标',
'Display full-window crosshairs aligned at 0 and 90 degrees':
'显示与 0 度和 90 度对齐的全窗口十字光标',
'Autoplace Fields': '自动放置字段',
'Bulk Edit Symbol Library Links': '批量编辑符号库链接',
'Draw and drag at any angle': '以任意角度绘制和拖动',
'Constrain drawing and dragging to horizontal or vertical motions':
'将绘制和拖动限制为水平或垂直移动',
'Constrain drawing and dragging to horizontal, vertical, or 45-degree angle motions':
'将绘制和拖动限制为水平、垂直或 45 度方向移动',
'Mark items excluded from simulation': '标记仿真中排除的项目',
Millimeters: '毫米',
Inches: '英寸',
Mils: '密耳',
'Mirror Horizontally': '水平镜像',
'Flips selected item(s) from left to right': '将所选项目左右翻转',
'Mirror Vertically': '垂直镜像',
'Flips selected item(s) from top to bottom': '将所选项目上下翻转',
'Move the symbol anchor': '移动符号锚点',
'Navigate Back': '向后导航',
'Move backward in sheet navigation history': '在图纸导航历史中后退',
'Navigate Forward': '向前导航',
'Move forward in sheet navigation history': '在图纸导航历史中前进',
'Navigate Up': '向上导航',
'Navigate up one sheet in the hierarchy': '在层次结构中向上移动一张图纸',
'Place Directive Labels': '放置指令标签',
'Place Global Labels': '放置全局标签',
'Place Hierarchical Labels': '放置层次标签',
'Place Images': '放置图像',
'Place Junctions': '放置连接点',
'Place Net Labels': '放置网络标签',
'Place No Connect Flags': '放置未连接标记',
'Add sheet pins from existing hierarchical labels found on that sheet':
'从该图纸中已有的层次标签添加图纸引脚',
'Place Power Symbols': '放置电源符号',
'Place Wire to Bus Entries': '放置导线到总线入口',
'Select Node': '选择节点',
'Select/Expand Connection': '选择/展开连接',
'Show associated datasheet or document': '显示关联的数据手册或文档',
'Show Bus Syntax Help': '显示总线语法帮助',
'Show Directive Labels': '显示指令标签',
'Show ERC Errors': '显示电气规则检查错误',
'Show ERC Exclusions': '显示电气规则检查排除项',
'Show ERC Warnings': '显示电气规则检查警告',
'Show library tree': '显示库树',
'Show OP Currents': '显示工作点电流',
'Show OP Voltages': '显示工作点电压',
'Show Pin Alternate Icons': '显示引脚备用图标',
'Show pin electrical types': '显示引脚电气类型',
'Show simulation window for running SPICE or IBIS simulations.':
'显示用于运行 SPICE 或 IBIS 仿真的窗口',
Swap: '交换',
'Sync All Sheet Pins': '同步所有图纸引脚',
'Synchronize all sheet pins and hierarchical labels': '同步所有图纸引脚和层次标签',
'Synchronized pins mode': '引脚同步模式',
'Toggle grid overrides': '切换网格覆盖设置',
'Unfold from Bus': '从总线展开',
'Unselect All': '取消全选',
'Zoom to worksheet area if exists or edited object': '缩放至工作表区域或当前编辑对象',
'Zoom to Selection Area': '缩放至选区',
'Add Barcode': '添加条形码',
'Add a barcode': '添加条形码',
'Board setup': '电路板设置',
'Clear all layers': '清除所有图层',
'Display background grid in the editing window': '在编辑窗口中显示背景网格',
'Interactively measure distance between points': '交互式测量两点之间的距离',
'Open Autodetected file(s) on a new layer.': '在新图层上打开自动检测的文件',
'Open Excellon drill file(s) on a new layer.': '在新图层上打开 Excellon 钻孔文件',
'Open Gerber plot file(s) on a new layer.': '在新图层上打开 Gerber 输出文件',
'Reload all layers': '重新加载所有图层',
'Show flashed items in outline mode': '以轮廓模式显示闪烁项目',
'Show layers in exclusive-or compare mode': '以异或比较模式显示图层',
'Show layers using opacity color forced mode': '使用强制不透明颜色模式显示图层',
'Import Altium Project Files': '导入 Altium 项目文件',
'Import CADSTAR Archive Project Files': '导入 CADSTAR 归档项目文件',
'Import Eagle Project Files': '导入 EAGLE 项目文件',
'Import EasyEDA Std Backup': '导入 EasyEDA 标准版备份',
'Import EasyEDA Pro Project': '导入 EasyEDA Pro 项目',
'Import PADS Project Files': '导入 PADS 项目文件',
'Import gEDA / Lepton EDA Project Files': '导入 gEDA / Lepton EDA 项目文件',
'Altium Project': 'Altium 项目',
'CADSTAR Project': 'CADSTAR 项目',
'EAGLE Project': 'EAGLE 项目',
'EasyEDA (JLCEDA) Pro Project': 'EasyEDA (JLCEDA) Pro 项目',
'EasyEDA (JLCEDA) Std Backup': 'EasyEDA (JLCEDA) 标准版备份',
'gEDA / Lepton EDA Project': 'gEDA / Lepton EDA 项目',
'PADS Project': 'PADS 项目',
'Clear Recent Projects': '清除最近项目',
'New Jobset File': '新建 Jobset 文件',
'Open Jobset File': '打开 Jobset 文件',
'Manage Design Block Libraries': '管理设计图块库',
'Manage Symbol Libraries': '管理符号库',
'Manage Footprint Libraries': '管理封装库',
'Unarchive Project': '解压项目',
'Line Mode for Wires and Buses': '导线和总线走线模式',
'Run footprint assignment tool': '运行封装分配工具',
'Show the electrical rules checker window': '显示电气规则检查器窗口',
'Generate Legacy Bill of Materials': '生成旧版物料清单',
'Remap Legacy Library Symbols': '重映射旧版库符号',
'Repeat Last Item': '重复上一个项目',
'Rescue Symbols': '修复符号',
'Reset Local Coordinates': '重置本地坐标',
Revert: '还原',
'Rotate Clockwise': '顺时针旋转',
'Rotate Counterclockwise': '逆时针旋转',
'Edit schematic setup including annotation styles and electrical rules':
'编辑原理图设置,包括标注样式和电气规则',
'Zoom to an area selection created by a mouse drag': '缩放至鼠标拖动选定的区域',
Panels: '面板',
'Open Text Editor': '打开文本编辑器',
'Schematic Editor': '原理图编辑器',
'PCB Editor': 'PCB 编辑器',
'Footprint Editor': '封装编辑器',
'Symbol Editor': '符号编辑器',
'Image Converter': '图像转换器',
'Drawing Sheet Editor': '图纸编辑器',
'3D Viewer': '3D 查看器',
'PCB Calculator': 'PCB 计算器',
'File History': '文件历史记录',
'Restore Local History': '恢复本地历史记录',
'Save Project': '保存项目',
'Close Project': '关闭项目',
'Delete Project': '删除项目',
'Rename Project': '重命名项目',
'Reset to Defaults': '恢复默认设置',
'Reset All Dialogs to Defaults': '将所有对话框恢复为默认设置',
'Choose a project': '选择项目',
'Create a new project': '创建新项目',
'Open a project': '打开项目',
'Import a project': '导入项目',
'No projects yet': '暂无项目',
'No project selected': '未选择项目',
'Project Manager': '项目管理器',
'[no project loaded]': '[未加载项目]',
'Unarchive Project...': '解压项目...',
'Edit global and/or project schematic symbol libraries': '编辑全局和/或项目原理图符号库',
'Edit global and/or project PCB footprint libraries': '编辑全局和/或项目 PCB 封装库',
'Convert bitmap images to schematic symbols or PCB footprints':
'将位图转换为原理图符号或 PCB 封装',
'Convert bitmap images to schematic or PCB components': '将位图转换为原理图或 PCB 元件',
'Show tools for calculating resistance, current capacity, etc.':
'显示电阻、电流承载能力等计算工具',
'Edit drawing sheet borders and title blocks for use in schematics and PCB designs':
'编辑用于原理图和 PCB 设计的图纸边框和标题栏',
'Edit drawing sheet borders and title block': '编辑图纸边框和标题栏',
'Recent Projects': '最近项目',
'Local Projects': '本地项目',
'Cloud Projects': '云端项目',
'Loading...': '加载中...',
'Loading Libraries...': '正在加载库...',
'Loading Symbol Libraries': '正在加载符号库',
'Loading Footprint Libraries': '正在加载封装库',
'Search...': '搜索...',
'Filter actions': '筛选操作',
'Type filter text': '输入筛选文字',
'Deselect All': '取消全选',
'Select Columns': '选择列',
'Select a file': '选择文件',
'Select a project': '选择项目',
'Select a folder': '选择文件夹',
'New name:': '新名称:',
'Project name:': '项目名称:',
'File name:': '文件名:',
'Description:': '描述:',
'Search:': '搜索:',
Error: '错误',
Warning: '警告',
Information: '信息',
Confirmation: '确认',
Errors: '错误',
'Default Font': '默认字体',
Default: '默认',
Solid: '实线',
Dashed: '虚线',
Dotted: '点线',
'Dash-Dot': '点划线',
Cancel: '取消',
OK: '确定',
Apply: '应用',
Close: '关闭',
Save: '保存',
'Save As': '另存为',
Open: '打开',
New: '新建',
Delete: '删除',
Remove: '移除',
Rename: '重命名',
Edit: '编辑',
View: '视图',
File: '文件',
Place: '放置',
Inspect: '检查',
Tools: '工具',
Help: '帮助',
Window: '窗口',
Preferences: '首选项',
Settings: '设置',
Libraries: '库',
Library: '库',
Symbol: '符号',
Symbols: '符号',
Footprint: '封装',
Footprints: '封装',
Schematic: '原理图',
Board: '电路板',
Import: '导入',
Export: '导出',
Reload: '重新加载',
Restore: '恢复',
Reset: '重置',
Add: '添加',
'Remove All': '全部移除',
Browse: '浏览',
Choose: '选择',
Select: '选择',
'Apply Changes': '应用更改',
'Discard Changes': '放弃更改',
Yes: '是',
No: '否',
Next: '下一步',
Finish: '完成',
Done: '完成',
Enabled: '已启用',
Disabled: '已禁用',
Show: '显示',
Hide: '隐藏',
General: '常规',
Display: '显示',
Colors: '颜色',
Color: '颜色',
Grids: '网格',
Grid: '网格',
Hotkeys: '快捷键',
Toolbars: '工具栏',
Mouse: '鼠标',
'Editing Options': '编辑选项',
Input: '输入',
System: '系统',
Language: '语言',
English: 'English',
Chinese: '中文',
'Read Only': '只读',
Unsaved: '未保存',
Modified: '已修改',
'Project:': '项目:',
Time: '时间',
Title: '标题',
Reference: '参考标号',
Value: '值',
Type: '类型',
Size: '大小',
Width: '宽度',
Height: '高度',
Position: '位置',
Orientation: '方向',
Preview: '预览',
Options: '选项',
Advanced: '高级',
About: '关于',
Version: '版本',
Loading: '正在加载',
Ready: '就绪',
Failed: '失败',
Success: '成功',
'Done.': '完成。',
'Open...': '打开...',
'Save...': '保存...',
'Browse...': '浏览...',
'Choose...': '选择...',
'New...': '新建...',
'Delete...': '删除...',
'Edit...': '编辑...',
'Import...': '导入...',
'Export...': '导出...',
'Close...': '关闭...',
'Cancel...': '取消...',
'About...': '关于...',
'New Project': '新建项目',
'New Project from Template': '根据模板新建项目',
'Save Project As...': '项目另存为...',
'Save All': '全部保存',
'Save a copy': '另存副本',
'Save Copy': '保存副本',
'Open from Computer...': '从电脑打开...',
'Open from GitHub...': '从 GitHub 打开...',
'Open Project Folder': '打开项目文件夹',
'Create New Folder': '新建文件夹',
'Select Files...': '选择文件...',
'Select a project template': '选择项目模板',
'Project Template Selector': '项目模板选择器',
'Duplicate Template': '复制模板',
'Edit Template': '编辑模板',
'Go Back': '返回上一步',
'No projects found': '未找到项目',
'No projects found.': '未找到项目。',
'No files found': '未找到文件',
'No files found.': '未找到文件。',
'No items to display': '没有可显示的项目',
'This project is a demo': '这是一个演示项目',
'This template does not include a description. You can still use it to create a project.':
'此模板没有说明文字,但仍可用于创建项目。',
'The repository must be public. Projects open read-only; "Save a copy" keeps one of your own.':
'代码仓库必须为公开仓库。项目将以只读方式打开;选择“另存副本”即可保存到本地。',
'Open this link on a laptop or desktop to get started.': '请在笔记本电脑或台式电脑上打开此链接。',
'On a tablet? Rotate to landscape, or connect a mouse.': '使用平板电脑时,请横屏使用或连接鼠标。',
'VibeMake PCB needs a bigger screen': 'VibeMake PCB 需要更大的屏幕',
'VibeMake PCB hit an unexpected error': 'VibeMake PCB 遇到意外错误',
'Error details': '错误详情',
"Your browser's storage is full, edits are no longer being saved.":
'浏览器存储空间已满,编辑内容无法继续保存。',
'Loading the board editor...': '正在加载 PCB 编辑器...',
'Loading the schematic editor...': '正在加载原理图编辑器...',
'Loading the symbol editor...': '正在加载符号编辑器...',
'Loading the footprint editor...': '正在加载封装编辑器...',
'Loading the 3D viewer...': '正在加载 3D 查看器...',
'Loading the PCB editor...': '正在加载 PCB 编辑器...',
'Loading project...': '正在加载项目...',
'Loading project files...': '正在加载项目文件...',
'Restoring your project...': '正在恢复项目...',
'Restore Project': '恢复项目',
'Open Recent...': '打开最近项目...',
'Clear Recent': '清除最近项目',
'Clear History': '清除历史记录',
'Restore Commit': '恢复此版本',
'Local History': '本地历史记录',
'No local history yet': '暂无本地历史记录',
'Restore this version': '恢复此版本',
'Keep both': '两者都保留',
'Reload Now': '立即重新加载',
'Project is read-only': '项目为只读状态',
'Read-only project': '只读项目',
'Open Project from GitHub...': '从 GitHub 打开项目...',
'Import from Computer...': '从电脑导入...',
'Open File': '打开文件',
'Save File': '保存文件',
'Save File As...': '文件另存为...',
'Open from Computer': '从电脑打开',
'KiCad from Computer...': '从电脑打开 KiCad 文件...',
'KiCad Project': 'KiCad 项目',
'KiCad Schematic': 'KiCad 原理图',
'KiCad Printed Circuit Board': 'KiCad PCB',
'KiCad Footprint': 'KiCad 封装',
'KiCad Schematic Symbol': 'KiCad 原理图符号',
'KiCad Drawing Sheet': 'KiCad 图纸',
'Gerber files (*.g*; *.pho)': 'Gerber 文件 (*.g*; *.pho)',
'Project Files': '项目文件',
Projects: '项目',
Project: '项目',
Home: '主页',
Computer: '本机',
'This Computer': '此电脑',
Back: '返回',
Forward: '前进',
Up: '上一级',
Refresh: '刷新',
'Sort by Name': '按名称排序',
'Sort by Date': '按日期排序',
Name: '名称',
'Date Modified': '修改日期',
'File Type': '文件类型',
'Create Folder': '新建文件夹',
'The selected location cannot be saved to.': '无法在所选位置保存文件。',
'This location cannot be saved to.': '无法在此位置保存文件。',
'Filter by name': '按名称筛选',
'Search packages...': '搜索软件包...',
'Add repository by URL...': '通过 URL 添加软件源...',
'Plugin and Content Manager': '插件和内容管理器',
'Plugin Options': '插件选项',
'Option Choices': '选项列表',
'Options supported by current plugin': '当前插件支持的选项',
'No pending changes. Queue installs or removals, then apply.':
'没有待处理的更改。请先添加安装或卸载操作,再应用更改。',
'Discard Pending': '放弃待处理的更改',
'Remove from pending': '从待处理列表中移除',
'Remove this repository': '移除此软件源',
'Requires a runtime not yet available in the browser': '需要浏览器中尚不可用的运行环境',
'Queue install': '加入安装队列',
'Set active': '设为当前主题',
'No pending changes': '没有待处理的更改',
Installed: '已安装',
Active: '当前使用',
Pinned: '已固定',
'Unpin (allow updates)': '取消固定(允许更新)',
'Pin (hold back updates)': '固定版本(暂停更新)',
'Theme preview': '主题预览',
'Color Themes': '颜色主题',
'Color theme files': '颜色主题文件',
'Open Theme Folder': '打开主题文件夹',
'Open the folder containing color themes': '打开存放颜色主题的文件夹',
'Override individual item colors': '覆盖单个项目的颜色',
'Show all items in their default color even if they have specific colors set in their properties.':
'即使项目属性中设置了专用颜色,也始终使用默认颜色显示。',
'Copy Version Info': '复制版本信息',
'Copied...': '已复制...',
'Previous page': '上一页',
'Next page': '下一页',
'Clipboard Error': '剪贴板错误',
'Could not open clipboard to write version information.': '无法访问剪贴板,不能写入版本信息。',
'Open source and third-party notices': '开源与第三方声明',
"Built on KiCad's work": '基于 KiCad 的工作成果',
'From the credits of KiCad 10.0.5, on which this program is built.':
'以下内容摘自本程序所基于的 KiCad 10.0.5 致谢名单。',
'VibeMake PCB is a browser-based electronics design workspace for schematic capture, PCB layout, 3D preview, and manufacturing outputs. Projects are stored locally in this browser.':
'VibeMake PCB 是一款基于浏览器的电子设计工作台,支持原理图绘制、PCB 布局、3D 预览和生产文件输出。项目保存在当前浏览器中。',
'This VibeMake-branded build is based on Ziro Designer (ZiroEDA), distributed under GPL-3.0-or-later. Its changes retain the upstream notices and copyright headers.':
'此 VibeMake 品牌版本基于 Ziro Designer(ZiroEDA),采用 GPL-3.0 或更高版本许可证分发。修改后的版本保留了上游声明与版权信息。',
'Much of VibeMake PCB is a TypeScript port of': 'VibeMake PCB 的许多部分是以 TypeScript 移植的',
"and its icons are KiCad's. Copyright The KiCad Developers, GPL-3.0-or-later.":
',图标也来自 KiCad。版权所有:KiCad 开发者,GPL-3.0 或更高版本许可证。',
", and its icons are KiCad's. Copyright The KiCad Developers, GPL-3.0-or-later.":
',图标也来自 KiCad。版权所有:KiCad 开发者,GPL-3.0 或更高版本许可证。',
"The symbol, footprint and 3D model libraries are KiCad's official":
'符号库、封装库和 3D 模型库均为 KiCad 官方',
'by the KiCad Libraries Team, under': ',由 KiCad 库团队提供,采用',
', by the KiCad Libraries Team, under': ',由 KiCad 库团队提供,采用',
'That exception means using them in a design does not place your design under share-alike terms.':
'该例外条款意味着,在设计中使用这些库不会要求您的设计采用相同的共享方式授权。',
'. That exception means using them in a design does not place your design under share-alike terms.':
'。该例外条款意味着,在设计中使用这些库不会要求您的设计采用相同的共享方式授权。',
'VibeMake PCB is not affiliated with or endorsed by the KiCad project. "KiCad" is a trademark of its respective owners.':
'VibeMake PCB 与 KiCad 项目没有关联,也未获其认可。“KiCad”为其各自所有者的商标。',
'for copyright and license information.': ',了解版权和许可证信息。',
'The complete VibeMake PCB suite is released under the':
'VibeMake PCB 完整套件依据以下许可证发布:',
'GNU General Public License (GPL) version 3 or any later version':
'GNU 通用公共许可证(GPL)第 3 版或任何后续版本',
'Portions derived from KiCad, copyright The KiCad Developers.':
'部分内容源自 KiCad,版权所有:KiCad 开发者。',
'Application:': '应用程序:',
'Version:': '版本:',
'Libraries:': '程序库:',
'Platform:': '平台:',
'WebGL:': 'WebGL:',
'Build Info:': '构建信息:',
'Date:': '日期:',
'Lead Development Team': '核心开发团队',
'Lead Development Alumni': '前核心开发团队',
'Additional Contributions By': '其他贡献者',
'Documentation Team': '文档团队',
'Librarian Team': '库维护团队',
'Package Developers': '软件包维护者',
Icons: '图标',
'Lead Development Team:': '核心开发团队:',
'Lead Development Alumni:': '前核心开发团队:',
'Additional Contributions By:': '其他贡献者:',
'Documentation Team:': '文档团队:',
'Librarian Team:': '库维护团队:',
'Package Developers:': '软件包维护者:',
'Icons:': '图标:',
See: '查看',
'font licenses': '字体许可证',
'Copy VibeMake PCB version info to the clipboard': '将 VibeMake PCB 版本信息复制到剪贴板',
'VibeMake PCB Schematic Editor': 'VibeMake PCB 原理图编辑器',
'VibeMake PCB Symbol Editor': 'VibeMake PCB 符号编辑器',
'VibeMake PCB Board Editor': 'VibeMake PCB 电路板编辑器',
'VibeMake PCB Footprint Editor': 'VibeMake PCB 封装编辑器',
'VibeMake PCB Gerber Viewer': 'VibeMake PCB Gerber 查看器',
'VibeMake PCB Drawing Sheet Editor': 'VibeMake PCB 图纸编辑器',
'VibeMake PCB Image Converter': 'VibeMake PCB 图像转换器',
'VibeMake PCB Calculator Tools': 'VibeMake PCB 计算器工具',
'VibeMake PCB 3D Viewer': 'VibeMake PCB 3D 查看器',
'VibeMake PCB Footprint Library Browser': 'VibeMake PCB 封装库浏览器',
'VibeMake PCB Symbol Library Browser': 'VibeMake PCB 符号库浏览器',
'VibeMake PCB Assign Footprints': 'VibeMake PCB 分配封装',
'About VibeMake PCB': '关于 VibeMake PCB',
'About VibeMake PCB Schematic Editor': '关于 VibeMake PCB 原理图编辑器',
'About VibeMake PCB Symbol Editor': '关于 VibeMake PCB 符号编辑器',
'About VibeMake PCB Board Editor': '关于 VibeMake PCB 电路板编辑器',
'About VibeMake PCB Footprint Editor': '关于 VibeMake PCB 封装编辑器',
'About VibeMake PCB Gerber Viewer': '关于 VibeMake PCB Gerber 查看器',
'About VibeMake PCB Drawing Sheet Editor': '关于 VibeMake PCB 图纸编辑器',
'About VibeMake PCB Image Converter': '关于 VibeMake PCB 图像转换器',
'About VibeMake PCB Calculator Tools': '关于 VibeMake PCB 计算器工具',
'About VibeMake PCB 3D Viewer': '关于 VibeMake PCB 3D 查看器',
'About VibeMake PCB Footprint Library Browser': '关于 VibeMake PCB 封装库浏览器',
'About VibeMake PCB Symbol Library Browser': '关于 VibeMake PCB 符号库浏览器',
'About VibeMake PCB Assign Footprints': '关于 VibeMake PCB 分配封装',
'Symbol Libraries': '符号库',
'Footprint Libraries': '封装库',
'Manage Symbol Libraries...': '管理符号库...',
'Manage Footprint Libraries...': '管理封装库...',
'Add new library to global library table': '将新库添加到全局库表',
'Add new library to project library table': '将新库添加到项目库表',
'Add Color Theme': '添加颜色主题',
'Theme already exists!': '主题已存在!',
'Clear Color': '清除颜色',
'Color Picker': '颜色选择器',
'Preview (old/new):': '预览(旧/新):',
'Opacity:': '不透明度:',
'Electrical Resistivity in Ohm*m at 20 deg C': '20°C 时的电阻率(Ω·m)',
'Temperature coefficient': '温度系数',
'Current density': '电流密度',
'Current density:': '电流密度:',
'Current exceeds the ampacity for this density.': '当前电流超过此电流密度下的载流能力。',
'Enter a positive resistivity and valid temperature.': '请输入大于零的电阻率和有效温度。',
'Wire properties': '导线属性',
'Standard Size:': '标准线径:',
Application: '应用场景',
'Current:': '电流:',
'Note: Values are minimal values': '注意:这些数值均为最小值',
'The controlling value is shown in bold.': '控制当前结果的数值以粗体显示。',
'The formula, from IPC 2221, is': '公式依据 IPC 2221:',
Pattern: '匹配模式',
'Net class:': '网络类:',
'Keywords:': '关键词:',
'(optional)': '(可选)',
'Available:': '可用:',
'Enabled:': '已启用:',
'Update interval:': '更新间隔:',
'Author name:': '作者姓名:',
'Author e-mail:': '作者邮箱:',
'Rotation speed:': '旋转速度:',
'Pan speed:': '平移速度:',
'Toolbar:': '工具栏:',
'This browser will not open a folder, so themes are saved and loaded as files.':
'此浏览器无法打开文件夹,因此主题将以文件形式保存和加载。',
'No hotkeys match “': '没有匹配“',
'VibeMake PCB...': 'VibeMake PCB 正在加载...',
'Anything else?': '还有其他想说的吗?',
"Couldn't load your data counts. Try again to review what will be deleted.":
'无法加载数据统计。请重试,以查看将被删除的内容。',
'If you forget your password, the only way you can recover your data is with this key.':
'如果忘记密码,只能使用此密钥恢复数据。',
"We don't store this key, so please save this in a safe place":
'我们不会保存此密钥,请将它妥善保管。',
'. Please check your inbox (and spam) to complete verification.':
'。请检查收件箱(包括垃圾邮件)以完成验证。',
'A new code is on its way. Use the newest email: it replaces the code before it.':
'新验证码正在发送。请使用最新邮件中的验证码,旧验证码将失效。',
'Your password encrypts your projects. We cannot reset it or read your designs without it.':
'你的密码用于加密项目。没有密码,我们无法重置密码或读取你的设计。',
'Already have an account?': '已有账户?',
'has an account, a reset link is on its way. Open it on this device to choose a new password.':
'已有账户,密码重置链接正在发送。请在此设备上打开链接并设置新密码。',
'We will email you a link to set a new password. Your projects stay encrypted: to open them under the new password you will also need your recovery key.':
'我们会通过邮件发送密码重置链接。项目仍会保持加密;使用新密码打开项目时,还需要恢复密钥。',
'Created your account before 10 September 2026? It has no recovery key yet and does not need one: the link lets you choose a password and sets up encryption.':
'如果你在 2026 年 9 月 10 日前创建了账户,目前还没有恢复密钥,也无需恢复密钥;打开链接后即可设置密码并启用加密。',
'Due to the nature of our end-to-end encryption protocol, your data cannot be decrypted without your password or recovery key.':
'由于端到端加密机制,没有密码或恢复密钥就无法解密数据。',
'If the password comes back to you, sign in with it as usual and save your recovery key from the account menu, so this never comes up again.':
'如果你想起了密码,请照常登录,并在账户菜单中保存恢复密钥,以免再次遇到此问题。',
'No recovery key?': '没有恢复密钥?',
'Account created before 10 September 2026? It needs a one-time upgrade for end-to-end encryption: use':
'如果账户创建于 2026 年 9 月 10 日之前,需要一次性升级以启用端到端加密:请使用',
'below to set your password again. No recovery key is needed.':
'下方选项重新设置密码。此过程无需恢复密钥。',
'New to ZiroEDA?': '首次使用 ZiroEDA?',
'... (step': '...(步骤',
'Conductor resistivity:': '导体电阻率:',
'Temperature Coefficient:': '温度系数:',
'Cable temperature:': '电缆温度:',
'Length:': '长度:',
'Unit:': '单位:',
'Voltage &gt; 500 V:': '电压 &gt; 500 V:',
'Voltage > 500 V:': '电压 > 500 V:',
'Note: Values are minimal values (from IPC 2221)': '注意:数值为最小值(依据 IPC 2221)',
'solid: clearance': '实线:电气间隙',
'dashed: creepage': '虚线:爬电距离',
'PCB material:': 'PCB 材料:',
'The goal of the IEC60664-1 is to provide guidance on designing insulation for products that have a connection to mains supply.':
'IEC 60664-1 旨在为连接市电的产品提供绝缘设计指导。',
'However some cases are not covered by this calculator:': '但此计算器不涵盖以下情况:',
'For frequencies higher than 30kHz, the dielectric performances are degraded. IEC60664-4 covers those cases':
'频率高于 30 kHz 时,介电性能会下降;此类情况由 IEC 60664-4 规范。',
'When using a conformal coating or a potting in order to protect for pollution, if all conditions specified by IEC60664-3 are met, the clearance and creepage distances can be reduced. Soldermask is usually not considered as a conformal coating.':
'使用敷形涂层或灌封材料防止污染时,若满足 IEC 60664-3 规定的所有条件,可缩短电气间隙和爬电距离。阻焊层通常不视为敷形涂层。',
'Insulations trough liquids, compressed air or gases other than air are not in the scope of IEC60664':
'液体、压缩空气或空气以外气体中的绝缘不属于 IEC 60664 的适用范围。',
'Passive components are commonly made with E-series values appropriate to their precision. Capacitors commonly use E12 values. 10% and 5% resistors commonly use E24 values. 1% resistors use E96 values. Other series are not commonly used.':
'无源元件通常采用与精度相匹配的 E 系列标称值。电容常用 E12 系列,精度为 10% 和 5% 的电阻常用 E24 系列,精度为 1% 的电阻常用 E96 系列。其他系列较少使用。',
'To select a value begin with the calculated target value and then round it to 2 significant figures for E24 or below or 3 significant figures for E48 and up. Then find the value in the table which is nearest to the significant figures remaining and substitute it for those figures.':
'选择数值时,先从计算得到的目标值开始:E24 及以下系列保留 2 位有效数字,E48 及以上系列保留 3 位。然后在表中找到最接近该有效数字的数值,并替换对应部分。',
'For example if the calculated target value is 16,834.2Ω then this rounds to 16,800Ω. The nearest value to 168 is 169 and the selected E96 value is 16.9kΩ.':
'例如,计算目标值为 16,834.2 Ω 时,先取整为 16,800 Ω。最接近 168 的数值为 169,因此选用的 E96 阻值为 16.9 kΩ。',
'The value 0 is a special case and is not present in any series.':
'数值 0 是特殊情况,不属于任何 E 系列。',
'Ambient temperature:': '环境温度:',
'Melting point:': '熔点:',
'You can use this calculator to check if a small track can handle a large current for a short period of time.':
'可使用此计算器检查较细的走线能否在短时间内承载较大电流。',
'This tool allows you to design a track fuse but should be used as an estimate only.':
'此工具可用于设计走线熔断器,但结果仅供估算。',
'to its melting point as well as the energy required for the change of phase.':
'直至熔点所需的能量,以及发生相变所需的能量。',
'This energy is then compared to the one dissipated by the wire resistance.':
'随后将此能量与导线电阻耗散的能量进行比较。',
'This table shows the difference in electrochemical potential between various metals and alloys. Galvanic corrosion affects different metals in contact and under certain conditions.':
'此表展示不同金属和合金之间的电化学电位差。在特定条件下,接触的不同金属可能发生电偶腐蚀。',
'The anode of an electrochemical pair gets oxidized and eaten away, while the cathode gets dissolved metals plated onto it but stays protected.':
'电化学对中的阳极会被氧化并逐渐腐蚀;溶出的金属则沉积到阴极表面,使阴极受到保护。',
"A positive number indicates that the row is anodic (-) and the column is cathodic (+), cold and warm coloring hues also indicate rows' potential.":
'正数表示行对应阳极(-)、列对应阴极(+);冷暖色调也表示行对应的电位。',
'EN 50310 suggests a voltage difference below 300mV. Known practices make use of a third interface metal in between the main pair(ie the ENIG surface finish).':
'EN 50310 建议电压差低于 300 mV。常见做法是在两种主要金属之间加入第三种界面金属,例如 ENIG 表面处理。',
"Selected cells shown with the default system's coloring choice after a table refill.":
'表格重新填充后,所选单元格将使用系统默认配色显示。',
'Threshold voltage:': '阈值电压:',
'Material names:': '材料名称:',
'Approximation:': '近似值:',
'This calculator finds combinations of standard E-series (between 10Ω and 1MΩ) to create arbitrary values.':
'此计算器会组合标准 E 系列阻值(10 Ω 至 1 MΩ),以得到所需的任意阻值。',
'You can enter the required resistance from 0.0025 to 4000 kΩ.':
'可输入 0.0025 至 4000 kΩ 的目标电阻值。',
'Solutions using up to 4 components are given.': '最多提供由 4 个元件组成的方案。',
'The requested value is always excluded from the solution set.':
'目标阻值始终不会出现在候选方案中。',
'Optionally up to two additional values can be excluded in case of component availability problems.':
'如果元件供应有限,还可额外排除最多两个阻值。',
'Solutions are given in the following formats:': '结果采用以下格式:',
'Regulators data file:': '稳压器数据文件:',
'Vref:': '参考电压:',
'Iadj:': '调整电流:',
'Overall tolerance:': '总容差:',
'Resistor tolerance:': '电阻容差:',
'Power Comment:': '功率备注:',
'Vref (min/typ/max):': '参考电压(最小值/典型值/最大值):',
'Iadj (typ/max):': '调整电流(典型值/最大值):',
'Remove regulator &lsquo;': '从库中移除稳压器“',
'&rsquo; from the library?': '”吗?',
'Remove regulator ‘': '从库中移除稳压器“',
'’ from the library?': '”吗?',
'is desired input impedance in Ω': '为所需的输入阻抗,单位为 Ω',
'is desired output impedance in Ω': '为所需的输出阻抗,单位为 Ω',
'Error!': '错误!',
'If you specify the maximum current, then the track widths will be calculated to suit.':
'指定最大电流后,将据此计算所需的走线宽度。',
'If you specify one of the track widths, the maximum current it can handle will be calculated. The width for the other track to also handle this current will then be calculated.':
'指定其中一条走线的宽度后,将计算其可承载的最大电流,并计算另一条走线承载相同电流所需的宽度。',
'The calculations are valid for currents up to 35 A (external) or 17.5 A (internal), temperature rises up to 100 °C, and widths of up to 400 mils (10 mm).':
'本计算适用于外层走线电流不超过 35 A、内层走线电流不超过 17.5 A、温升不超过 100 °C、走线宽度不超过 400 mil(10 mm)的情况。',
'where:': '其中:',
'is temperature rise above ambient in °C': '表示高于环境温度的温升,单位为 °C',
'is thickness (height) in mils': '表示厚度(高度),单位为 mil',
'is 0.024 for internal tracks or 0.048 for external tracks': '内层走线取 0.024,外层走线取 0.048',
'Frequency:': '频率:',
'mur:': '相对磁导率:',
'Redraw speed:': '重绘速度:',
'Instances of this symbol (': '此符号的实例(',
'items):': '个):',
'Cached Symbol:': '缓存的符号:',
'(selection color can be edited in the "Colors" page)': '(可在“颜色”页面中修改选区颜色)',
'Left click (and drag) actions depend on 2 modifier keys:':
'鼠标左键点击和拖动的操作取决于两个辅助键:',
'Add item(s) to selection': '将项目添加到选区',
'Ctrl+Shift': 'Ctrl+Shift',
'Remove item(s) from selection': '从选区中移除项目',
'Install schematic data sources from the Plugin and Content Manager. Data sources extend KiCad by linking schematic items to external data providers.':
'从插件与内容管理器安装原理图数据源。数据源可将原理图项目关联到外部数据提供方,从而扩展 KiCad 的功能。',
'Any:': '任意:',
'Nothing has been changed or copied.': '没有更改或复制任何内容。',
'✓ Projects synced': '✓ 项目已同步',
'did not sync:': '未能同步:',
'Syncing cloud projects...': '正在同步云端项目...',
'Share &ldquo;': '共享“',
'&rdquo;': '”',
'Share “': '共享“',
'”': '”',
'This project has not reached the cloud yet, so there is nothing to share. Let it sync, then share it.':
'此项目尚未同步到云端,因此暂时无法共享。请先等待同步完成,再进行共享。',
'Invited &mdash; not signed in yet': '已邀请,尚未登录',
'Closing the link later stops new people opening it. Anyone already on the list keeps access until you remove them.':
'之后关闭链接可阻止新用户打开项目。已在列表中的用户仍可访问,直到将其移除。',
'This template does not include a description. You can still use it to create a new project.':
'此模板没有说明,但仍可用于创建新项目。',
'Select a template to see what it contains.': '选择模板以查看其内容。',
"VibeMake PCB is an electronics design workspace for schematic capture, PCB layout and 3D preview. It's built for a mouse, a keyboard and room to work, so there's no phone version yet.":
'VibeMake PCB 是一款电子设计工作台,支持原理图绘制、PCB 布局和 3D 预览。它针对鼠标、键盘和较大的工作空间进行了优化,暂不支持手机。',
'Update:': '更新:',
'Requires app ≥': '所需应用版本 ≥',
'Libraries and colour themes install and work today.': '库和配色主题现已支持安装和使用。',
'Repository:': '代码仓库:',
'Apply Pending Changes (': '应用待处理的更改(',
"Your project is still in memory. Download it before reloading, reloading will discard anything that hasn't been saved.":
'项目仍保存在内存中。重新加载前请先下载;重新加载会丢弃所有未保存的更改。',
"The download failed. Copy the error below and report it, please don't reload, your work is still recoverable from this tab.":
'下载失败。请复制下方错误信息并提交报告。请勿重新加载,此标签页中的工作仍可恢复。',
'No open project was in memory, so nothing was lost. Reloading should get you back.':
'内存中没有打开的项目,因此没有内容丢失。重新加载后即可继续使用。',
Attenuators: '衰减器',
Parameters: '参数',
Values: '数值',
Messages: '消息',
Formula: '公式',
'Attenuation (a):': '衰减量 (a):',
Calculate: '计算',
Netclasses: '网络类',
'Netclass Assignments': '网络类分配',
'Customize toolbars': '自定义工具栏',
'Insert Separator': '插入分隔线',
'Add to toolbar': '添加到工具栏',
'Toolbar items': '工具栏项目',
'Clear the filter': '清除筛选条件',
'Add empty row to table': '向表格添加空行',
'Remove library from table': '从表格中移除库',
'Move up': '上移',
'Move down': '下移',
'Move grid up': '上移网格',
'Move grid down': '下移网格',
'Move netclass up': '上移网络类',
'Move netclass down': '下移网络类',
'Add grid': '添加网格',
'Edit grid': '编辑网格',
'Remove grid': '移除网格',
'Add netclass': '添加网络类',
'Remove netclass': '移除网络类',
'Add assignment': '添加分配项',
'Remove assignment': '移除分配项',
'Add embedded file': '添加嵌入文件',
'Remove embedded file': '移除嵌入文件',
'Export embedded files': '导出嵌入文件',
'Embed fonts': '嵌入字体',
'Paste Special': '选择性粘贴',
'Reference Designators': '元件位号',
'Clear net assignments': '清除网络分配',
'Remove the net information from all connected items before pasting':
'粘贴前清除所有关联项目的网络信息',
'Export to other sheets': '导出到其他图纸',
'Custom paper size:': '自定义纸张尺寸:',
'Drawing Sheet File': '图纸文件',
'Issue Date:': '发布日期:',
'Output mode:': '输出模式:',
'Print drawing sheet': '打印图框',
'Print Frame references.': '打印图框参考标记。',
'Fit to page': '适合页面',
'Custom:': '自定义:',
'Rendering Engine': '渲染引擎',
'User Interface': '用户界面',
'Show scrollbars in editors': '在编辑器中显示滚动条',
'This change takes effect when relaunching the editor.': '重新启动编辑器后,此更改才会生效。',
'Show popup indicator when toggling settings with hotkeys': '使用快捷键切换设置时显示弹出提示',
'When enabled, certain hotkeys that cycle between settings will show a popup indicator briefly to indicate the change in settings.':
'启用后,使用部分快捷键循环切换设置时,会短暂显示弹出提示。',
'Use alternating row colors in tables': '在表格中使用交替行颜色',
'When enabled, use a different color for every other table row':
'启用后,表格每隔一行使用不同的颜色。',
'Disable custom cursors': '禁用自定义光标',
'When enabled, KiCad will use default system cursors instead of custom ones':
'启用后,将使用系统默认光标,而不是自定义光标。',
'Icon theme:': '图标主题:',
'Toolbar icon size:': '工具栏图标大小:',
'High-contrast mode dimming factor:': '高对比度模式暗化系数:',
'First hotkey selects tool': '首次按下快捷键时选择工具',
'If not checked, hotkeys will immediately perform an action even if the relevant tool was not previously selected.':
'未勾选时,即使尚未选择对应工具,按下快捷键也会立即执行操作。',
'Pan and Zoom': '平移和缩放',
'Center and warp cursor on zoom': '缩放时将光标移至中心',
'Center the cursor on screen when zooming.': '缩放时将光标移至屏幕中心。',
'Automatically pan while moving object': '移动对象时自动平移画布',
'When drawing a track or moving an item, pan when approaching the edge of the display.':
'绘制走线或移动项目时,光标接近屏幕边缘会自动平移画布。',
'Use zoom acceleration': '使用缩放加速',
'Zoom faster when scrolling quickly': '快速滚动时加快缩放速度',
'Zoom speed:': '缩放速度:',
'How far to zoom in for each rotation of the mouse wheel': '鼠标滚轮每转动一格的缩放幅度',
'Pick the zoom speed automatically': '自动选择缩放速度',
'Auto pan speed:': '自动平移速度:',
'How fast to pan when moving an object off the edge of the screen':
'对象移至屏幕边缘之外时的画布平移速度',
'Drag Gestures': '拖动操作',
'Left button drag:': '鼠标左键拖动:',
'Middle button drag:': '鼠标中键拖动:',
'Right button drag:': '鼠标右键拖动:',
'Pan on mouse movement with key:': '按住按键并移动鼠标以平移:',
'Scroll Gestures': '滚动操作',
'Vertical touchpad or scroll wheel movement:': '触控板垂直滑动或滚轮滚动:',
'Only one action can be assigned to each column': '每列只能分配一个操作',
'Pan left/right with horizontal movement': '通过水平滚动左右平移',
'Pan the canvas left and right when scrolling left to right on the touchpad':
'在触控板上水平滚动时左右平移画布',
'Reset to Mouse Defaults': '恢复鼠标默认设置',
'Reset to Trackpad Defaults': '恢复触控板默认设置',
'Set Hotkey': '设置快捷键',
'Press a new hotkey, or press Esc to cancel...': '请按下新的快捷键,或按 Esc 取消...',
'Current key:': '当前按键:',
'Clear assigned hotkey': '清除已分配的快捷键',
Alternate: '备用快捷键',
Description: '说明',
'Elapsed time:': '已用时间:',
'Output Messages': '输出消息',
'Show:': '显示:',
'Hide this message.': '隐藏此消息。',
'Not implemented yet': '尚未实现',
'This setup page is not implemented yet.': '此设置页面尚未实现。',
'Reset this page to defaults': '将此页面恢复为默认设置',
'Delete Preset': '删除预设',
'Delete Viewport': '删除视口',
Appearance: '外观',
'Background Jobs': '后台任务',
'More tools': '更多工具',
'More Actions': '更多操作',
'Zoom to Selection': '缩放至选区',
'Pan to Selection': '平移至选区',
'Zoom to fit cross-probed items': '缩放以适配交叉探测项目',
'View Preset Switcher': '视图预设切换器',
'Sort and expand options': '排序和展开选项',
'Recent searches': '最近搜索',
'Clear the search': '清除搜索内容',
'Scaling ruler': '屏幕缩放标尺',
'Display PPI:': '显示器 PPI:',
Detect: '检测',
'Theme:': '主题:',
'Name:': '名称:',
Clearance: '间距',
'Via Hole': '过孔孔径',
'Tuning Profile': '调谐配置',
'PCB Color': 'PCB 颜色',
'Wire Thickness': '导线粗细',
'Bus Thickness': '总线粗细',
'Line Style': '线型',
'Default Fields': '默认字段',
'Add field': '添加字段',
'Delete field': '删除字段',
'File:': '文件:',
'Size:': '尺寸:',
'Orientation:': '方向:',
'Height:': '高度:',
'Width:': '宽度:',
'Open File...': '打开文件...',
'Save As...': '另存为...',
'No objects selected': '未选择对象',
'Basic Properties': '基本属性',
Datasheet: '数据手册',
'Search Hidden Fields': '搜索隐藏字段',
'Search Metadata': '搜索元数据',
'Open Recent': '最近打开',
Zoom: '缩放',
'Grid Origin...': '网格原点...',
'View Preset': '视图预设',
Undo: '撤销',
Redo: '重做',
Repeat: '重复',
Cut: '剪切',
Copy: '复制',
Paste: '粘贴',
Duplicate: '复制并粘贴',
'Select All': '全选',
Find: '查找',
'Find and Replace': '查找和替换',
'Edit Properties': '编辑属性',
'Edit Symbol': '编辑符号',
'Edit Footprint': '编辑封装',
'Update PCB from Schematic': '从原理图更新 PCB',
'Design Rules Checker': '设计规则检查器',
'Footprint Assignment Tool': '封装分配工具',
'View in 3D Viewer': '在 3D 查看器中查看',
'Page Setup...': '页面设置...',
'Print Preview': '打印预览',
'Export Netlist...': '导出网表...',
'Plot...': '绘制输出...',
'Gerber Viewer': 'Gerber 查看器',
'Drawing Sheet': '图纸',
'Electrical Rules Checker': '电气规则检查器',
'Assign Footprints': '分配封装',
'Update PCB': '更新 PCB',
'Place Symbol': '放置符号',
'Place Footprint': '放置封装',
'Place Text': '放置文本',
'Add Text': '添加文本',
'Draw Text': '绘制文本',
'Add Label': '添加标签',
'Add Global Label': '添加全局标签',
'Add Hierarchical Label': '添加层次标签',
'Add Junction': '添加连接点',
'Add Wire': '添加导线',
'Add Bus': '添加总线',
'Add No Connect': '添加不连接标记',
'Draw Line': '绘制直线',
'Draw Rectangle': '绘制矩形',
'Draw Circle': '绘制圆形',
'Add Dimension': '添加尺寸标注',
'Add Graphic Polygon': '添加图形多边形',
'Add Filled Rectangle': '添加填充矩形',
'Add Rule Area': '添加规则区域',
'Place Alignment Target': '放置对准标记',
'Select Connection': '选择连接',
'Highlight Net': '高亮网络',
'Clear Net Highlight': '取消网络高亮',
'Show All': '全部显示',
'Hide All': '全部隐藏',
'Show Hidden Pins': '显示隐藏引脚',
'Show Hidden Fields': '显示隐藏字段',
'Toggle Hidden Pins': '切换隐藏引脚显示',
'Toggle Hidden Fields': '切换隐藏字段显示',
Lock: '锁定',
Unlock: '解锁',
'Lock Item': '锁定项目',
'Unlock Item': '解锁项目',
Properties: '属性',
'Footprint Properties': '封装属性',
'Symbol Properties': '符号属性',
'Board Setup': '电路板设置',
'Schematic Setup': '原理图设置',
'Page Settings': '页面设置',
'Electrical Spacing': '电气间距',
'Track Width': '走线宽度',
'Via Size': '过孔尺寸',
Netclass: '网络类',
'Netclass Setup': '网络类设置',
'Signal Integrity': '信号完整性',
Simulation: '仿真',
Simulator: '仿真器',
'Data Sources': '数据源',
'Field Name Templates': '字段名称模板',
'Origins & Axes': '原点和坐标轴',
'Version Control': '版本控制',
'Mouse and Touchpad': '鼠标和触控板',
'Display Options': '显示选项',
'Graphics Defaults': '图形默认值',
'Footprint Defaults': '封装默认值',
'Defaults for New Objects': '新对象的默认值',
'Default line width:': '默认线宽:',
'Default text size:': '默认文本大小:',
'Default pin length:': '默认引脚长度:',
'Default pin number size:': '默认引脚编号大小:',
'Default pin name size:': '默认引脚名称大小:',
'Import colors from schematic': '从原理图导入颜色',
'No default footprint': '没有默认封装',
'All dialogs reset to defaults.': '所有对话框已恢复为默认设置。',
'File history cleared.': '文件历史记录已清除。',
'Error: ': '错误:',
'Warning: ': '警告:',
'Changes applied.': '更改已应用。',
'No results': '没有结果',
Search: '搜索',
Filter: '筛选',
Clear: '清除',
'Choose a file': '选择文件',
'Choose a folder': '选择文件夹',
'Open Folder': '打开文件夹',
'Save to Computer...': '保存到电脑...',
Download: '下载',
Upload: '上传',
'Working...': '正在处理...',
'Waiting...': '正在等待...',
'Please wait': '请稍候',
'Please wait...': '请稍候...',
'This action cannot be undone.': '此操作无法撤销。',
'Are you sure?': '确定要继续吗?',
'Are you sure you want to delete this project?': '确定要删除此项目吗?',
'Delete this project?': '删除此项目?',
'Project name cannot be empty.': '项目名称不能为空。',
'A project with this name already exists.': '已存在同名项目。',
'Could not open project.': '无法打开项目。',
'Could not save project.': '无法保存项目。',
'Could not read file.': '无法读取文件。',
'Could not write file.': '无法写入文件。',
'An unexpected error occurred.': '发生了意外错误。',
};
const WORDS: Readonly<Record<string, string>> = {
about: '关于',
action: '操作',
actions: '操作',
active: '活动',
all: '全部',
angle: '角度',
apply: '应用',
archive: '归档',
autorouter: '自动布线',
board: '电路板',
browse: '浏览',
calculator: '计算器',
cancel: '取消',
center: '居中',
change: '更改',
check: '检查',
choose: '选择',
clear: '清除',
close: '关闭',
color: '颜色',
command: '命令',
confirm: '确认',
connect: '连接',
copy: '复制',
current: '当前',
cut: '剪切',
data: '数据',
default: '默认',
delete: '删除',
design: '设计',
disabled: '已禁用',
display: '显示',
distance: '距离',
document: '文档',
edit: '编辑',
editor: '编辑器',
electrical: '电气',
enable: '启用',
enabled: '已启用',
error: '错误',
export: '导出',
file: '文件',
files: '文件',
fill: '填充',
filter: '筛选',
finish: '完成',
footprint: '封装',
footprints: '封装',
format: '格式',
general: '常规',
gerber: 'Gerber',
grid: '网格',
help: '帮助',
hide: '隐藏',
height: '高度',
history: '历史记录',
import: '导入',
information: '信息',
inspect: '检查',
input: '输入',
insert: '插入',
language: '语言',
layer: '图层',
layers: '图层',
library: '库',
libraries: '库',
list: '列表',
loading: '加载中',
local: '本地',
manager: '管理器',
modified: '已修改',
move: '移动',
name: '名称',
net: '网络',
network: '网络',
new: '新建',
no: '否',
none: '无',
open: '打开',
option: '选项',
options: '选项',
origin: '原点',
output: '输出',
page: '页面',
panel: '面板',
paste: '粘贴',
pcb: 'PCB',
project: '项目',
properties: '属性',
preview: '预览',
read: '读取',
recent: '最近',
redo: '重做',
refresh: '刷新',
remove: '移除',
rename: '重命名',
repair: '修复',
report: '报告',
reset: '重置',
restore: '恢复',
retry: '重试',
save: '保存',
schematic: '原理图',
search: '搜索',
select: '选择',
settings: '设置',
show: '显示',
size: '大小',
symbol: '符号',
symbols: '符号',
system: '系统',
theme: '主题',
time: '时间',
title: '标题',
tool: '工具',
tools: '工具',
undo: '撤销',
update: '更新',
value: '值',
version: '版本',
view: '视图',
warning: '警告',
width: '宽度',
window: '窗口',
yes: '是',
zoom: '缩放',
add: '添加',
align: '对齐',
and: '和',
arc: '圆弧',
as: '为',
assign: '分配',
assigned: '已分配',
automatic: '自动',
background: '后台',
basic: '基本',
browser: '浏览器',
build: '构建',
button: '按钮',
cache: '缓存',
canvas: '画布',
collapse: '折叠',
column: '列',
columns: '列',
computer: '电脑',
configure: '配置',
crosshairs: '十字光标',
corner: '角',
create: '创建',
cycle: '循环',
custom: '自定义',
directory: '目录',
double: '双',
drawing: '图纸',
draw: '绘制',
embedded: '嵌入',
exclude: '排除',
expand: '展开',
existing: '已有',
extract: '提取',
fast: '快速',
fit: '适合',
folder: '文件夹',
from: '从',
full: '完整',
fullscreen: '全屏',
global: '全局',
graphic: '图形',
groups: '组',
group: '组',
hidden: '隐藏',
highlight: '高亮',
horizontal: '水平',
icons: '图标',
inactive: '非活动',
install: '安装',
item: '项目',
items: '项目',
key: '按键',
label: '标签',
left: '左',
line: '线',
lines: '线条',
marker: '标记',
mode: '模式',
mouse: '鼠标',
next: '下一项',
object: '对象',
objects: '对象',
of: '的',
in: '在',
inner: '内部',
increase: '增加',
decrease: '减少',
last: '上一个',
microwave: '微波',
on: '开启',
pan: '平移',
plugins: '插件',
popup: '弹出',
previous: '上一项',
print: '打印',
python: 'Python',
rectangle: '矩形',
reference: '参考',
references: '参考标记',
reload: '重新加载',
right: '右',
row: '行',
rows: '行',
run: '运行',
screen: '屏幕',
selected: '已选中',
selection: '选区',
sheet: '图纸',
sketch: '草图',
swap: '交换',
pins: '引脚',
pin: '引脚',
pad: '焊盘',
pair: '对',
place: '放置',
plot: '绘制输出',
polygons: '多边形',
route: '布线',
router: '布线器',
ratsnest: '飞线',
rule: '规则',
rules: '规则',
separator: '分隔线',
small: '小型',
special: '特殊',
switch: '切换',
table: '表格',
to: '到',
tracks: '走线',
wires: '导线',
zones: '区域',
text: '文本',
the: '',
with: '使用',
zone: '区域',
field: '字段',
fields: '字段',
blocks: '区块',
block: '区块',
cursor: '光标',
vertically: '垂直',
horizontally: '水平',
units: '单位',
unit: '单位',
up: '上',
down: '下',
rotate: '旋转',
rotated: '已旋转',
kicad: 'KiCad',
github: 'GitHub',
api: 'API',
url: 'URL',
ipc: 'IPC',
webgl: 'WebGL',
typescript: 'TypeScript',
svg: 'SVG',
'3d': '3D',
toggle: '切换',
track: '走线',
ungroup: '取消编组',
unpin: '取消固定',
upload: '上传',
vertical: '垂直',
violation: '违规项',
worksheet: '工作表',
write: '写入',
};
const TECHNICAL_WORDS = new Set([
'3d',
'api',
'cc-by-sa',
'gerber',
'github',
'html',
'ipc',
'kicad',
'pcb',
'ppi',
'python',
'react',
'svg',
'typescript',
'url',
'vibemake',
'webgl',
]);
const PHRASE_PREFIXES = Object.keys(PHRASES)
.filter((key) => key.endsWith(':') || key.endsWith('...'))
.sort((a, b) => b.length - a.length);
function storedLanguage(): UiLanguage {
try {
const raw = JSON.parse(localStorage.getItem(COMMON_SETTINGS_KEY) ?? 'null') as {
system?: { language?: unknown };
} | null;
return raw?.system?.language === 'English' ? 'en' : 'zh-CN';
} catch {
return 'zh-CN';
}
}
let currentLanguage: UiLanguage = storedLanguage();
export function getUiLanguage(): UiLanguage {
return currentLanguage;
}
export function setUiLanguage(language: string | UiLanguage): void {
const next: UiLanguage = language === 'en' || language === 'English' ? 'en' : 'zh-CN';
if (next === currentLanguage) return;
currentLanguage = next;
for (const listener of listeners) listener();
}
export function subscribeUiLanguage(listener: () => void): () => void {
listeners.add(listener);
return () => listeners.delete(listener);
}
export function useUiLanguage(): UiLanguage {
return useSyncExternalStore(subscribeUiLanguage, getUiLanguage, getUiLanguage);
}
/** Translate visible UI text while preserving whitespace, mnemonics and hotkeys. */
export function translateText(text: string, language = currentLanguage): string {
if (language === 'en' || text.trim() === '') return text;
const leading = text.match(/^\s*/u)?.[0] ?? '';
const trailing = text.match(/\s*$/u)?.[0] ?? '';
const body = text.slice(leading.length, text.length - trailing.length || undefined);
const mnemonic = body.startsWith('&') ? '&' : '';
const source = mnemonic ? body.slice(1) : body;
let translated = PHRASES[source];
if (translated === undefined) {
const prefix = PHRASE_PREFIXES.find((key) => source.startsWith(key));
if (prefix)
translated = `${PHRASES[prefix]}${translateText(source.slice(prefix.length), language)}`;
}
if (translated === undefined) {
const word = source.toLowerCase();
translated = Object.hasOwn(WORDS, word) && WORDS[word] ? WORDS[word] : source;
}
if (translated === source && /\s/u.test(source)) {
const words = [...source.matchAll(/[A-Za-z][A-Za-z0-9-]*/gu)];
const canTranslate =
words.length > 0 &&
words.every(
({ 0: word }) =>
Object.hasOwn(WORDS, word.toLowerCase()) || TECHNICAL_WORDS.has(word.toLowerCase()),
);
if (canTranslate) {
translated = source
.replace(/[A-Za-z][A-Za-z0-9-]*/gu, (word) => WORDS[word.toLowerCase()] ?? word)
.replace(/([\u3400-\u9fff])\s+(?=[\u3400-\u9fff])/gu, '$1')
.trim();
}
}
return `${leading}${mnemonic}${translated}${trailing}`;
}
/** Translate text nodes in static HTML such as the About dialog pages. */
export function translateHtml(html: string, language = currentLanguage): string {
if (language === 'en' || typeof DOMParser === 'undefined') return html;
const parsed = new DOMParser().parseFromString(html, 'text/html');
const walker = parsed.createTreeWalker(parsed.body, 4);
let node = walker.nextNode();
while (node) {
if (node.textContent) node.textContent = translateText(node.textContent, language);
node = walker.nextNode();
}
return parsed.body.innerHTML;
}