Skip to content

fix(i18n,ui): 修 PR #236 合并后 ja/ko 缺键 + SelectionAsk 启用开关右置#307

Merged
appergb merged 1 commit into
mainfrom
fix/post-pr236-i18n-selectionask-ui
May 7, 2026
Merged

fix(i18n,ui): 修 PR #236 合并后 ja/ko 缺键 + SelectionAsk 启用开关右置#307
appergb merged 1 commit into
mainfrom
fix/post-pr236-i18n-selectionask-ui

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 7, 2026

User description

Summary

PR #236 合并到 main 之后两处后续修复:

  • i18n 缺键(阻塞 main CI):PR feat: add configurable shortcut bindings #236 引入了 7 个 `recording.comboRecord*` 键(comboRecordLabel / Desc / Btn / Hint / Recorded / Clear / Conflict)和 1 个 `hotkey.triggers.custom` 键,但 `ja.ts` / `ko.ts` 没有同步更新,main 的 `npm run build` 在 `tsc` 阶段直接 TS2740 / TS2741 报错。本 PR 在两份本地化文件里补齐这 8 个键。
  • SelectionAsk 启用 UI 不一致:划词追问页"触发快捷键"卡片之前用的是"右上角状态徽标 + 下方启用按钮"两段式 UI;"保存历史"卡片则把开关挂在卡底 44×24。统一改成与 `Style` 页顶栏一致的 36×20 toggle,固定在卡片标题行右侧。抽出 `CardHeaderToggle` 同文件复用,没动其它页面(Translation 用的是 select 驱动的 enabled 概念,结构不同,不属于同一类问题)。

Test plan

  • `npm run build` (tsc + vite) 通过
  • `cargo check --manifest-path src-tauri/Cargo.toml` 通过
  • `./scripts/build-mac.sh INSTALL=0` 产出 `OpenLess.app` + `OpenLess_1.2.21_aarch64.dmg`
  • CI(Windows Tauri checks + pr_agent_job)通过
  • 手测:SelectionAsk 页的两个 toggle 视觉与 Style 页 master toggle 一致;切换 QA 启用时 ShortcutRecorder 正确出现/隐藏

PR Type

Bug fix, Enhancement


Description

  • Add missing comboRecord* and triggers.custom keys to ja.ts and ko.ts

  • Replace SelectionAsk toggle buttons with reusable CardHeaderToggle for UI consistency

  • Remove legacy enable button and status badge from SelectionAsk page


Diagram Walkthrough

flowchart LR
  A["Add missing i18n keys in ja.ts & ko.ts"] -- "Fixes TypeScript build errors" --> B["i18n keys available for ShortcutRecorder"]
  C["Refactor SelectionAsk.tsx"] -- "Replaces legacy toggle with CardHeaderToggle" --> D["Consistent toggle UI across settings"]
Loading

File Walkthrough

Relevant files
Bug fix
ja.ts
Add missing shortcut recording keys to Japanese translation

openless-all/app/src/i18n/ja.ts

  • Added 7 comboRecord* keys and triggers.custom key for Japanese
    localization
  • Restores missing translation entries causing TypeScript build errors
+8/-0     
ko.ts
Add missing shortcut recording keys to Korean translation

openless-all/app/src/i18n/ko.ts

  • Added 7 comboRecord* keys and triggers.custom key for Korean
    localization
  • Restores missing translation entries causing TypeScript build errors
+8/-0     
Enhancement
SelectionAsk.tsx
Refactor SelectionAsk toggles to reusable CardHeaderToggle

openless-all/app/src/pages/SelectionAsk.tsx

  • Replaced custom enable button and status badge with CardHeaderToggle
    component
  • Unified history save toggle to 36×20 design matching Style page
    switches
  • Removed old inline toggle styles and button markup
+60/-56 

PR #236 合并后两处后续修复:

1. ja.ts / ko.ts 缺 PR 引入的 7 个 comboRecord* 键和 1 个
   triggers.custom 键,导致 main 的 npm run build 直接 TS 报错。
   补齐后 tsc 通过。

2. SelectionAsk 划词追问页:触发快捷键卡片把"右上角状态徽标 +
   下方启用按钮"换成与 Style 页一致的右上角 36×20 toggle;
   保存历史卡片同步从底部 44×24 开关改成右上角同款 toggle。
   抽出 CardHeaderToggle 复用,跟 design_handoff Style 页对齐。
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

236 - Partially compliant

Compliant requirements:

  • Localized settings copy (ja, ko translations for comboRecord and custom triggers)

Non-compliant requirements:

(none)

Requires further human verification:

  • Manual testing of SelectionAsk toggle visual consistency with Style page toggle.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@appergb appergb merged commit 2c9dca5 into main May 7, 2026
3 checks passed
@appergb appergb deleted the fix/post-pr236-i18n-selectionask-ui branch May 10, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant