diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c2ba0d..75cc9c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,6 +87,17 @@ jobs: with: generate_release_notes: false body: | + ## 平台支援 + + | | Windows | macOS | Linux | + |---|:---:|:---:|:---:| + | `migao fix` CLI | ✅ | ✅ | ✅ | + | `migao-watch` 快捷鍵常駐 | ✅ | — | — | + + macOS / Linux 下載包僅含 `migao` CLI;`migao-watch` 為 Windows 專屬功能。 + + --- + ## 安裝方式 ### Windows(推薦) diff --git a/.gitignore b/.gitignore index 9d230cd..4ba6dc6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ scripts/cache/ !.agents/skills/test-smoke/** !.agents/skills/test-e2e/ !.agents/skills/test-e2e/** +scripts/** +debug.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 5288f88..5bb7e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.1] - 2026-06-11 + +- **Fixed:** After correcting `bopomofo-daqian` garbled text, `migao-watch` now switches the foreground window's input method back to Chinese mode automatically. Uses `ImmGetDefaultIMEWnd` + `WM_IME_CONTROL` (cross-process safe), with `WM_INPUTLANGCHANGEREQUEST` as a fallback for keyboard-layout switching. Resolves [#1](https://github.com/winterdrive/migao/issues/1). +- **Added:** Tray right-click menu now shows the installed version (`migao vX.Y.Z`) as a grayed-out header item. +- **Added:** `install.ps1` now accepts a `-Prerelease` switch to install the latest pre-release build for testing. + ## [0.5.0] - 2026-06-04 ### Added diff --git a/Cargo.toml b/Cargo.toml index 4c41173..19dd062 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "migao" -version = "0.5.0" +version = "0.5.1" edition = "2021" description = "IME garbled text recovery — 翻譯米糕" license = "MIT AND Apache-2.0" @@ -34,7 +34,7 @@ clap = { version = "4", features = ["derive"] } arboard = "3" [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["winuser", "wingdi", "winbase", "winnt", "synchapi", "consoleapi", "wincon", "processthreadsapi"] } +winapi = { version = "0.3", features = ["winuser", "wingdi", "winbase", "winnt", "synchapi", "consoleapi", "wincon", "processthreadsapi", "imm"] } tray-icon = { version = "0.24.0", default-features = false } winreg = "0.56.0" image = { version = "0.25", default-features = false, features = ["png"] } diff --git a/README.md b/README.md index c8af328..cac76e2 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,16 @@ cargo build --release --- -## Windows Daily Use — Migao Watch +## Windows Daily Use — Migao Watch *(Windows only)* `migao-watch` runs silently in the system tray and fixes garbled text anywhere on Windows with a single hotkey. +> **macOS / Linux:** `migao-watch` is not yet available on non-Windows platforms. Contributions are welcome — open an [Issue](https://github.com/winterdrive/migao/issues) to discuss or claim the work. +> In the meantime, two alternatives exist: +> +> - **CLI pipe:** `pbpaste | migao fix | pbcopy` (macOS) or `xclip -o | migao fix | xclip -i` (Linux) +> - **AI agent:** IDEs with skill support (Claude Code, Cursor, etc.) can call `migao fix` directly — see [`skills/migao/SKILL.md`](skills/migao/SKILL.md) + ### Fix selected text in-place 1. Launch **Migao Watch** from Start Menu, or let it start at login. diff --git a/docs/README.ja.md b/docs/README.ja.md index c228f2f..effd0a9 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -43,7 +43,10 @@ Uninstall: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/winterdrive/migao/main/install.ps1))) -Uninstall ``` -## Windows Daily Use +## Windows Daily Use *(Windows only)* + +`migao-watch` is currently Windows-only. macOS / Linux contributions are welcome — open an [Issue](https://github.com/winterdrive/migao/issues) to discuss. +Alternatives: **CLI pipe** `pbpaste | migao fix | pbcopy` (macOS) / `xclip -o | migao fix | xclip -i` (Linux); **AI agent** see [`skills/migao/SKILL.md`](../skills/migao/SKILL.md) 1. Start Menu から **Migao Watch** を起動します。自動起動を有効にしている場合は不要です。 2. 入力方式を切り替え忘れて文字化けしたテキストを選択します。多くのエディタでは **Ctrl+A** で入力欄全体を選択できます。 diff --git a/docs/README.ko.md b/docs/README.ko.md index 84eca93..485bd83 100644 --- a/docs/README.ko.md +++ b/docs/README.ko.md @@ -43,7 +43,10 @@ Uninstall: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/winterdrive/migao/main/install.ps1))) -Uninstall ``` -## Windows Daily Use +## Windows Daily Use *(Windows only)* + +`migao-watch` is currently Windows-only. macOS / Linux contributions are welcome — open an [Issue](https://github.com/winterdrive/migao/issues) to discuss. +Alternatives: **CLI pipe** `pbpaste | migao fix | pbcopy` (macOS) / `xclip -o | migao fix | xclip -i` (Linux); **AI agent** see [`skills/migao/SKILL.md`](../skills/migao/SKILL.md) 1. Start Menu에서 **Migao Watch**를 실행합니다. 자동 실행을 켜 둔 경우에는 따로 실행할 필요가 없습니다. 2. 입력기를 바꾸지 않아 잘못 입력된 텍스트를 선택합니다. 많은 에디터에서는 **Ctrl+A**로 입력 칸 전체를 선택할 수 있습니다. diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md index 30e74d7..6135efb 100644 --- a/docs/README.zh-CN.md +++ b/docs/README.zh-CN.md @@ -41,7 +41,10 @@ irm https://raw.githubusercontent.com/winterdrive/migao/main/install.ps1 | iex & ([scriptblock]::Create((irm https://raw.githubusercontent.com/winterdrive/migao/main/install.ps1))) -Uninstall ``` -## Windows 日常使用 +## Windows 日常使用 *(仅限 Windows)* + +`migao-watch` 目前仅支援 Windows。macOS / Linux 欢迎贡献——请至 [Issues](https://github.com/winterdrive/migao/issues) 讨论或认领。 +目前有两种替代方案:**CLI pipe:** `pbpaste | migao fix | pbcopy`(macOS)或 `xclip -o | migao fix | xclip -i`(Linux);**AI agent:** 见 [`skills/migao/SKILL.md`](../skills/migao/SKILL.md) 1. 从开始菜单启动 **Migao Watch**,或让它开机自动启动。 2. 照常打字。如果忘记切换输入法而产生乱码,选中它;在很多编辑器里,**Ctrl+A** 可以选中整个输入框。 diff --git a/docs/README.zh-TW.md b/docs/README.zh-TW.md index 4a03140..2372175 100644 --- a/docs/README.zh-TW.md +++ b/docs/README.zh-TW.md @@ -59,10 +59,16 @@ cargo build --release --- -## Windows 常駐程式 — `migao-watch` +## Windows 常駐程式 — `migao-watch` *(僅限 Windows)* `migao-watch` 靜默執行於系統匣,在任何 Windows 應用程式中,按一個快捷鍵即可就地修正亂碼。 +> **macOS / Linux:** `migao-watch` 目前僅支援 Windows,歡迎貢獻其他平台版本——請至 [Issues](https://github.com/winterdrive/migao/issues) 討論或認領。 +> 目前有兩種替代方案: +> +> - **CLI pipe:** `pbpaste | migao fix | pbcopy`(macOS)或 `xclip -o | migao fix | xclip -i`(Linux) +> - **AI agent:** 支援 skill 的 IDE(Claude Code、Cursor 等)可直接呼叫 `migao fix`——見 [`skills/migao/SKILL.md`](../skills/migao/SKILL.md) + ### 使用流程 1. 從開始選單啟動 **Migao Watch**(或設定開機自動啟動) diff --git a/docs/en.html b/docs/en.html index 873680f..aae948c 100644 --- a/docs/en.html +++ b/docs/en.html @@ -211,8 +211,9 @@
migao-watch runs silently in the background — no terminal needed. Works in any app: LINE, browser, Word, VS Code.
+macOS / Linux support is not yet available. Contributions welcome — open an Issue to discuss.
migao-watch 常駐背景,不需要開終端機,在任何應用程式(LINE、瀏覽器、Word)都有效。
+macOS / Linux 歡迎貢獻——Issues 討論或認領。