feat: localize style pack defaults and migration#455
Conversation
…ss#333) release-sync: workflow rollout + soaked beta features → main
PR Open-Less#330 在 jobs.build 顶层多加了一个 env: 块来定义 OPENLESS_RELEASE_CHANNEL, 但下面 strategy/runs-on 之后已经有一个 env: 块(TAURI_SIGNING_PRIVATE_KEY 等)。 YAML map 不允许重复 key——GitHub Actions 解析直接 fail,整条 release-tauri.yml 工作流变成 "workflow file issue" 启动失败。 修复:把 OPENLESS_RELEASE_CHANNEL 并到下面那个唯一的 env: 块里,保留完整注释。 校验: - python -c "yaml.safe_load(...)" 解析成功 - jobs.build.env 现在有 3 个 key: OPENLESS_RELEASE_CHANNEL, TAURI_SIGNING_PRIVATE_KEY, TAURI_SIGNING_PRIVATE_KEY_PASSWORD Co-authored-by: baiqing <lbx12309@icloud.com>
包含 PR Open-Less#378 / Open-Less#379 / Open-Less#380 / Open-Less#381 + 版本号 bump。
Keep the submodule pinned to the reviewed commit while moving the fetch URL to Open-Less/qwen-asr, then document the review checklist future upgrades must follow.\n\nConstraint: Open-Less#301 identified the personal upstream submodule URL as a supply-chain risk.\nRejected: Updating the submodule commit together with the URL change | would mix provenance hardening with unreviewed upstream code changes.\nConfidence: high\nScope-risk: narrow\nDirective: Do not point .gitmodules back to antirez/qwen-asr; sync upstream into the organization fork and review the diff first.\nTested: gh repo view Open-Less/qwen-asr; git submodule update --init --recursive openless-all/app/src-tauri/vendor/qwen-asr; git diff --check; npm run build; cargo check --manifest-path src-tauri/Cargo.toml\nNot-tested: macOS INSTALL=0 ./scripts/build-mac.sh C-link verification.
…sr-fork Route qwen-asr submodule through organization fork
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Pull request overview
The PR title and description state that this change localizes style pack defaults and migration (zh-CN / zh-TW / en builtin style packs, locale-aware reset/migration, and corresponding frontend i18n wiring). However, the diffs actually shipped only contain bulk Simplified→Traditional Chinese conversions of comments and echo strings inside three helper shell scripts under scripts/. None of the described style-pack, migration, or i18n source changes appear in the diff.
The mechanical S→T conversion also introduced a number of well-known auto-conversion artifacts (e.g., 权限 → 許可權, 扩展 → 擴充套件, 二进制 → 二進位制, 循环 → 迴圈, 子进程 → 子程序, 回归 → 迴歸, 质量 → 質量, 绑定 → 繫結) that are either incorrect or nonstandard in Taiwan-style Traditional Chinese. The confusion-word example list in finding-helper.sh (homophone test data) is also semantically broken by the conversion.
Changes:
scripts/finding-helper.sh: comments/echo strings translated to Traditional Chinesescripts/bump-version.sh: comments/echo strings translated to Traditional Chinesescripts/audit-system-level.sh: large architectural-audit report template translated to Traditional Chinese
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| scripts/finding-helper.sh | S→T translation of comments, echo messages, and embedded report template; introduces several mis-conversions and semantically alters the ASR confusion-word example list |
| scripts/bump-version.sh | S→T translation of comments and echo/error messages only; no functional changes |
| scripts/audit-system-level.sh | S→T translation of a large heredoc-embedded markdown audit report; introduces multiple TW-locale terminology issues |
Comments suppressed due to low confidence (3)
scripts/finding-helper.sh:201
- "子程序" is an incorrect S→T conversion for "子进程". In Traditional Chinese, "进程" (process) should be "行程" or kept as "程序" only when meaning "program". The auto-converter rendered "进程" as "程序" producing "子程序", which in Traditional Chinese means "subroutine/subprogram", not "subprocess/child process". The intended meaning here is OS child process; consider "子行程" (TW convention) or "子進程".
scripts/finding-helper.sh:184 - Mechanical S→T conversions of confusion-word examples have changed the actual content meaning and broken the test data. The list is meant to enumerate ASR mis-recognitions (e.g., "merge" being misheard as "摸鸡", "release" as "瑞丽丝"). After conversion to "摸雞" / "瑞麗絲" / "西愛" / "批閱", the strings no longer match the real homophones produced by Mandarin ASR for these English terms — they are now phonetically and lexically different from the ASR outputs they're supposed to model. If this list is consumed anywhere as actual confusion-word data, it should not be auto-translated; either keep the original Simplified examples or rewrite the table for a Traditional-Chinese ASR baseline.
scripts/audit-system-level.sh:226 - "複製" is acceptable for "拷贝", but consider that this script is documentation only — these mechanical translations of internal architecture-audit notes provide little user-facing value while introducing many subtle terminology errors (覆蓋率 vs 覆蓋率, 實現/實作, 執行時, 擴充套件性, 許可權, 迴圈, 二進位制 etc.). If the goal is to standardise on Traditional Chinese for the project, recommend running the output through a TW-locale review (or the OpenCC
s2twp.jsonprofile, which uses Taiwan phrase mappings) rather than the defaults2ttable that produced these artifacts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,5 +1,5 @@ | |||
| #!/bin/bash | |||
| # Finding 辅助脚本 - 自动收集项目信息用于 EPIC 规划 | |||
| # Finding 輔助指令碼 - 自動收集專案資訊用於 EPIC 規劃 | |||
| - [ ] permissions.rs - 权限检查 | ||
| ### 低優先順序(平臺特定) | ||
| - [ ] hotkey.rs - 熱鍵監聽 | ||
| - [ ] permissions.rs - 許可權檢查 |
| - [ ] coordinator.rs - 狀態機、會話管理 | ||
| - [ ] asr/volcengine.rs - WebSocket ASR | ||
| - [ ] asr/frame.rs - 二进制帧编解码 | ||
| - [ ] asr/frame.rs - 二進位制幀編解碼 |
| 1. Rust crate 直接绑定(推荐) | ||
| 2. 子进程 + HTTP(备选) | ||
| ### 整合方式 | ||
| 1. Rust crate 直接繫結(推薦) |
| @@ -1,5 +1,5 @@ | |||
| #!/bin/bash | |||
| # 系统级审计脚本 - 发现架构、安全、扩展性问题 | |||
| # 系統級審計指令碼 - 發現架構、安全、擴充套件性問題 | |||
| - ⚠️ **cpal 0.15**: 音频库,跨平台兼容性需关注 | ||
| ### 技術棧風險 | ||
| - ✅ **Tauri 2**: 成熟穩定,社群活躍 | ||
| - ✅ **Tokio**: 非同步執行時,效能優秀 |
| - ⚠️ **Coordinator 依赖过多**:依赖 8+ 个模块 | ||
| ### 依賴健康度 | ||
| - ✅ **單向依賴**:所有模組依賴 types,types 不依賴任何模組 | ||
| - ✅ **無迴圈依賴**:模組間無迴圈依賴 |
| - 新功能质量无保障 | ||
| - 技术债务累积 | ||
| **影響**: | ||
| - 重構風險高(容易引入迴歸 bug) |
| - 技术债务累积 | ||
| **影響**: | ||
| - 重構風險高(容易引入迴歸 bug) | ||
| - 新功能質量無保障 |
| @@ -38,25 +38,25 @@ CARGO_LOCK="$APP/src-tauri/Cargo.lock" | |||
|
|
|||
| for f in "$PKG_JSON" "$PKG_LOCK" "$TAURI_CONF" "$CARGO_TOML" "$CARGO_LOCK"; do | |||
| if [ ! -f "$f" ]; then | |||
| echo "错误:找不到 $f" >&2 | |||
| echo "錯誤:找不到 $f" >&2 | |||
| exit 1 | |||
| fi | |||
| done | |||
|
|
|||
| # package.json + package-lock.json:npm version 一行同步两个,且不打 git tag。 | |||
| # --allow-same-version 让脚本可重复运行(实际 release flow 不会,但 dry-run 友好)。 | |||
| # package.json + package-lock.json:npm version 一行同步兩個,且不打 git tag。 | |||
| # --allow-same-version 讓指令碼可重複執行(實際 release flow 不會,但 dry-run 友好)。 | |||
| echo "▶ 升 package.json + package-lock.json → $NEW" | |||
| ( cd "$APP" && npm version "$NEW" --no-git-tag-version --allow-same-version > /dev/null ) | |||
|
|
|||
| # tauri.conf.json:BSD sed 与 GNU sed 都支持 -E + -i.bak 后缀;不用行号范围地址。 | |||
| # tauri.conf.json:BSD sed 與 GNU sed 都支援 -E + -i.bak 字尾;不用行號範圍地址。 | |||
| echo "▶ 升 tauri.conf.json → $NEW" | |||
| sed -E -i.bak \ | |||
| "s/\"version\":[[:space:]]*\"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"$NEW\"/" \ | |||
| "$TAURI_CONF" | |||
| rm "$TAURI_CONF.bak" | |||
|
|
|||
| # Cargo.toml:用 awk 替换文件里第一个 version = "X.Y.Z" 行(顶层 [package].version)。 | |||
| # 不用 GNU sed 的 `0,/.../` 行号范围地址(macOS BSD sed 不支持)。 | |||
| # Cargo.toml:用 awk 替換檔案裡第一個 version = "X.Y.Z" 行(頂層 [package].version)。 | |||
| # 不用 GNU sed 的 `0,/.../` 行號範圍地址(macOS BSD sed 不支援)。 | |||
| echo "▶ 升 Cargo.toml → $NEW" | |||
| awk -v new="$NEW" ' | |||
| !done && /^version = "[0-9]+\.[0-9]+\.[0-9]+"$/ { | |||
| @@ -67,13 +67,13 @@ awk -v new="$NEW" ' | |||
| ' "$CARGO_TOML" > "$CARGO_TOML.tmp" | |||
| mv "$CARGO_TOML.tmp" "$CARGO_TOML" | |||
|
|
|||
| # Cargo.lock:cargo update 显式同步 openless package;失败要立刻退出,不能吞错。 | |||
| # Cargo.lock:cargo update 顯式同步 openless package;失敗要立刻退出,不能吞錯。 | |||
| echo "▶ 同步 Cargo.lock" | |||
| ( cd "$APP/src-tauri" && cargo update -p openless 2>&1 | tail -5 ) | |||
|
|
|||
| # 校验五处一致(package.json / package-lock.json / tauri.conf.json / Cargo.toml / Cargo.lock) | |||
| # 校驗五處一致(package.json / package-lock.json / tauri.conf.json / Cargo.toml / Cargo.lock) | |||
| echo | |||
| echo "===== 验证版本一致性 =====" | |||
| echo "===== 驗證版本一致性 =====" | |||
| PKG=$(node -p "require('$PKG_JSON').version") | |||
| LOCK_ROOT=$(node -p "require('$PKG_LOCK').version") | |||
| LOCK_NESTED=$(node -p "require('$PKG_LOCK').packages[''].version") | |||
| @@ -96,14 +96,14 @@ done | |||
|
|
|||
| if [ "$mismatch" -ne 0 ] || [ "$PKG" != "$NEW" ]; then | |||
| echo | |||
| echo "::error::版本号未对齐 — 请检查脚本输出" >&2 | |||
| echo "::error::版本號未對齊 — 請檢查指令碼輸出" >&2 | |||
User description
變更摘要
驗證
影響範圍
PR Type
Enhancement, Bug fix, Documentation
Description
Localize builtin style pack resources
zh-CN,zh-TW, andendefaultsMake migration and reset language-aware
Improve Windows IME locale handling
Refresh style pack UI and docs
qwen-asrworkflow notesDiagram Walkthrough
File Walkthrough
1 files
Add locale-aware TSF profile selection13 files
Localize builtin style migrations and resetGenerate localized builtin packs from JSONLoad embedded style pack defaultsUse localized defaults in commandsAdd simplified Chinese pack defaultsAdd traditional Chinese pack defaultsAdd English pack defaultsUse translated pack names and labelsRefresh Taiwanese style pack translationsAdd Japanese style pack translationsAdd English style pack translationsAdd simplified Chinese style pack translationsAdd Korean style pack translations2 files
Register style pack resources moduleExport updated locale bundles1 files
Point qwen-asr submodule to fork3 files
Add submodule upgrade review checklistDocument upstream Windows PR workflowUpdate repository docs for fork18 files