Translate entire project from Chinese to English#5
Translate entire project from Chinese to English#5ChaoticSi1ence wants to merge 2 commits intoTIANLI0:mainfrom
Conversation
Translates all UI text, comments, log messages, error messages, installer strings, documentation, and scripts to English across 51 files. Firmware protocol values and backward-compatible string matching are intentionally preserved in Chinese. Also adds GitHub Actions CI workflow for automated builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace typographic quotes (U+201C/U+201D) with standard double quotes at line 1035 placeholder attribute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
最近比较忙,我有空审一下 |
There was a problem hiding this comment.
Pull request overview
This PR replaces Chinese UI strings, logs, comments, and documentation across the project with English equivalents, and adds a Windows CI build workflow.
Changes:
- Translates user-facing strings and developer-facing text (comments/logs/docs) across Go backend, Next.js frontend, scripts, and bridge/installer assets.
- Updates some domain identifiers (e.g., manual gear names/levels) to English.
- Adds a GitHub Actions workflow to build the app and publish artifacts on Windows.
Reviewed changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| wails.json | Translates app metadata comment string. |
| scripts/temp/temp.go | Translates comments and console output strings in the temp hardware info script. |
| scripts/rpm_rgb_probe.py | Translates CLI help text, markdown output, and console messages. |
| scripts/hid_data.md | Translates HID packet notes/documentation. |
| scripts/hid_controller.go | Translates comments and console output strings for HID test tool. |
| scripts/ble_write.py | Translates messages/comments for BLE exploration tool. |
| scripts/ble_read.py | Translates messages/comments for BLE monitor tool. |
| scripts/ble_data.md | Translates BLE packet capture notes. |
| main.go | Translates log messages and comments for core-service launch/second-instance logic. |
| internal/version/version.go | Translates version module comments. |
| internal/types/types.go | Translates type comments; changes default config strings and gear command identifiers. |
| internal/tray/tray.go | Translates tray UI strings and log messages. |
| internal/temperature/temperature.go | Translates bridge/fallback messages and comments. |
| internal/smartcontrol/target.go | Translates comments. |
| internal/smartcontrol/learning.go | Translates comments. |
| internal/smartcontrol/helpers.go | Translates comments. |
| internal/smartcontrol/doc.go | Translates package doc comment. |
| internal/smartcontrol/config.go | Translates comments. |
| internal/notifier/notifier.go | Translates notification default title and log message. |
| internal/logger/logger.go | Translates comments and error messages. |
| internal/ipc/ipc.go | Translates IPC comments and error/log messages. |
| internal/hotkey/manager.go | Translates comments and error/log messages. |
| internal/device/rgb.go | Translates error messages and comments in RGB control. |
| internal/config/config.go | Translates config manager log/error messages and comments. |
| internal/bridge/bridge.go | Translates bridge manager logs/errors and comments. |
| internal/autostart/autostart.go | Translates messages and expands schtasks “not found” matching. |
| frontend/src/app/types/app.ts | Translates TS type comments. |
| frontend/src/app/store/app-store.ts | Translates user-visible error/toast strings and console logs. |
| frontend/src/app/services/api.ts | Translates comments in API wrapper. |
| frontend/src/app/lib/manualGearPresets.ts | Translates/renames manual gear preset strings to English. |
| frontend/src/app/layout.tsx | Translates app description metadata. |
| frontend/src/app/components/ui/index.tsx | Translates default select placeholder. |
| frontend/src/app/components/FanCurveProfileSelect.tsx | Translates placeholder and empty-state label. |
| frontend/src/app/components/DeviceStatus.tsx | Translates UI strings and labels. |
| frontend/src/app/components/AppShell.tsx | Translates tab titles and accessibility label. |
| frontend/src/app/components/AppFatalError.tsx | Translates fatal error UI strings. |
| cmd/core/main.go | Translates comments and panic/log messages in core entrypoint. |
| cmd/core/curve_profiles.go | Translates curve profile names and error messages. |
| cmd/core/crash_report.go | Translates crash report stderr/log output. |
| build_bridge.bat | Translates build script output strings. |
| bridge/TempBridge/Program.cs | Translates console output and exception/error strings. |
| bridge/README.md | Translates bridge build/usage documentation. |
| app.go | Translates GUI-side logs, comments, and API method docstrings. |
| README.md | Translates top-level project documentation. |
| .vscode/tasks.json | Translates task failure strings. |
| .github/workflows/build.yml | Adds Windows CI build workflow (Go/Node/Bun/.NET/NSIS + artifacts). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // GearCommands contains preset gear commands | ||
| var GearCommands = map[string][]GearCommand{ | ||
| "静音": { | ||
| {"1挡低", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x14, 0x05, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1300}, | ||
| {"1挡中", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0xa4, 0x06, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1700}, | ||
| {"1挡高", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x6c, 0x07, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1900}, | ||
| "Silent": { | ||
| {"Gear1-Low", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x14, 0x05, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1300}, | ||
| {"Gear1-Mid", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0xa4, 0x06, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1700}, | ||
| {"Gear1-High", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x6c, 0x07, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1900}, | ||
| }, | ||
| "标准": { | ||
| {"2挡低", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x34, 0x08, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2100}, | ||
| {"2挡中", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x60, 0x09, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2310}, | ||
| {"2挡高", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x8c, 0x0a, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2760}, | ||
| "Standard": { |
There was a problem hiding this comment.
GearCommands keys and preset names were translated (e.g., "Silent", "Standard", ...) which changes the API/config values used by SetManualGear (it indexes types.GearCommands[gear]). This will break existing configs/clients that still send the previous gear identifiers, and it also doesn't match the current frontend preset value "Quiet". Consider keeping stable, non-localized gear IDs (e.g., canonical constants) and only translating display labels in the UI, or provide an explicit backward-compatible alias map.
| "Silent": { | ||
| {"Gear1-Low", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x14, 0x05, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1300}, | ||
| {"Gear1-Mid", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0xa4, 0x06, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1700}, | ||
| {"Gear1-High", []byte{0x5a, 0xa5, 0x26, 0x05, 0x00, 0x6c, 0x07, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 1900}, | ||
| }, | ||
| "标准": { | ||
| {"2挡低", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x34, 0x08, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2100}, | ||
| {"2挡中", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x60, 0x09, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2310}, | ||
| {"2挡高", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x8c, 0x0a, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2760}, | ||
| "Standard": { | ||
| {"Gear2-Low", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x34, 0x08, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2100}, | ||
| {"Gear2-Mid", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x60, 0x09, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2310}, | ||
| {"Gear2-High", []byte{0x5a, 0xa5, 0x26, 0x05, 0x01, 0x8c, 0x0a, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2760}, | ||
| }, | ||
| "强劲": { | ||
| {"3挡低", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xf0, 0x0a, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2800}, | ||
| {"3挡中", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xb8, 0x0b, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 3000}, | ||
| {"3挡高", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xe4, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 3300}, | ||
| "Power": { | ||
| {"Gear3-Low", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xf0, 0x0a, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 2800}, | ||
| {"Gear3-Mid", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xb8, 0x0b, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 3000}, | ||
| {"Gear3-High", []byte{0x5a, 0xa5, 0x26, 0x05, 0x02, 0xe4, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 3300}, | ||
| }, |
There was a problem hiding this comment.
The command names/levels here use "Low/Mid/High" (capitalized and "Mid"), but the current manual-gear selection logic in internal/device/device.go matches levels via strings.Contains(cmd.Name, "low"|"medium"|"high") and switch cases that include "medium" (not "Mid"). With the new names, no command will be selected and manual gear setting will fail. Fix by normalizing case when matching and accepting "mid"/"medium" consistently, or change these command names to include the expected tokens.
| @@ -276,13 +276,13 @@ func GetDefaultConfig(isAutoStart bool) AppConfig { | |||
| TempUpdateRate: 2, | |||
| TempSampleCount: 1, | |||
| ConfigPath: "", | |||
| ManualGear: "标准", | |||
| ManualLevel: "中", | |||
| ManualGear: "Standard", | |||
| ManualLevel: "Mid", | |||
| DebugMode: false, | |||
There was a problem hiding this comment.
Default config values use ManualGearLevels entries like "Mid" and ManualLevel: "Mid", but the backend manual-gear handler currently recognizes levels like "medium"/"low"/"high" (and Chinese equivalents). This default will cause manual gear selection to fail unless the handler also accepts "Mid". Align the stored config values with the accepted level vocabulary (or update the handler to accept both).
| export const MANUAL_GEAR_PRESETS: ManualGearPreset[] = [ | ||
| { | ||
| gear: '静音', | ||
| gear: 'Quiet', | ||
| colorClass: 'text-emerald-500', | ||
| borderClass: 'border-emerald-500/50', | ||
| bgClass: 'bg-emerald-500/12', | ||
| levels: [ | ||
| { level: '低', rpm: 1300 }, | ||
| { level: '中', rpm: 1700 }, | ||
| { level: '高', rpm: 1900 }, | ||
| { level: 'Low', rpm: 1300 }, | ||
| { level: 'Mid', rpm: 1700 }, | ||
| { level: 'High', rpm: 1900 }, | ||
| ], |
There was a problem hiding this comment.
The frontend manual gear preset uses gear: 'Quiet', but the backend preset command map uses the key "Silent" (and SetManualGear indexes by the provided string). This mismatch will make manual gear selection fail. Use the same canonical gear identifiers across frontend/backend (e.g., "Silent") and translate only the user-facing label.
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.23' |
There was a problem hiding this comment.
actions/setup-go is pinned to Go 1.23, but go.mod declares go 1.26.0. This will cause CI failures or unexpected behavior when module/toolchain features differ. Prefer go-version-file: go.mod or update go-version to match the required Go toolchain.
| go-version: '1.23' | |
| go-version-file: 'go.mod' |
| - **go-hid**:HID 设备通信 | ||
| - **zap**:日志记录 | ||
| ### Backend | ||
| - **Go 1.25+**: Primary development language |
There was a problem hiding this comment.
README lists two different minimum Go versions: "Go 1.25+" under Tech Stack and "Go 1.21+" under Required Software. This is confusing for contributors and should be reconciled to a single supported minimum (ideally matching go.mod).
| - **Go 1.25+**: Primary development language | |
| - **Go**: Primary development language |
English:
This is a full rewrite of all Chinese text to English — not a supplement or i18n addition. Merging this will replace all Chinese UI text, comments, log messages, error messages, and documentation with English equivalents. Chinese users would lose their native language interface.
This PR is best suited as:
If this doesn't fit your project's direction, no worries — the English version is available as a standalone fork at ChaoticSi1ence/BS2PRO-Controller for English-speaking users.
中文:
这是一个将所有中文文本完全重写为英文的 PR —— 不是补充翻译,也不是国际化(i18n)方案。合并此 PR 将会替换所有中文界面文本、注释、日志信息、错误信息和文档为英文。中文用户将失去中文界面。
此 PR 更适合作为:
如果这不符合您的项目方向,完全没有问题 —— 英文版本已作为独立 Fork 发布在 ChaoticSi1ence/BS2PRO-Controller,供英文用户使用。
Summary / 概述
Translates all UI text, comments, log messages, error messages, installer strings, documentation, and scripts to English across 51 files
Firmware protocol values and backward-compatible string matching are intentionally preserved in Chinese to maintain device compatibility
Adds GitHub Actions CI workflow for automated builds
将 51 个文件中的所有界面文本、注释、日志信息、错误信息、安装程序字符串、文档和脚本翻译为英文
固件协议值和向后兼容的字符串匹配有意保留为中文,以确保设备通信正常
新增 GitHub Actions CI 工作流用于自动化构建
Files Changed / 修改的文件
internal/packages,main.go,app.go,cmd/core/*TempBridge/Program.csproject.nsi— all UI text, language changed to EnglishREADME.md,bridge/README.md, data docswails.json,build_bridge.bat,.vscode/tasks.json.github/workflows/build.ymlIntentionally Preserved Chinese Strings / 有意保留的中文字符串
cmd/core/app.go: Device firmware protocol values used in equality comparisons against device-returned data / 设备固件协议值,用于与设备返回数据进行匹配internal/autostart/autostart.go: Chinese Windowsschtaskserror message check alongside English equivalents / 中文 Windows 系统schtasks错误信息检查(同时保留英文)internal/device/device.go: Dual-language gear level matching for backward compatibility / 双语档位匹配,确保向后兼容Test Plan / 测试计划
🤖 Generated with Claude Code