v0.2: kana/latin mode-switch language-bar button - #4
Conversation
A language-bar toggle (ITfLangBarItemButton + ITfLangBarItem + ITfSource) switching between Kana mode (romaji->katakana) and Latin mode (direct alphabet passthrough), using the mode_kana/mode_latn icons. The mode is shared with the key handler via Rc<Cell<Mode>>: in Latin mode letters pass straight through; in Kana mode they build the composition. Added in Activate / removed in Deactivate. resources.rc gains numeric icon IDs so the button can LoadIconW by id. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TextService now implements ITfFunctionProvider + ITfFnConfigure + ITfFunction, so the 'Options' button next to ainuKey in Windows language settings opens a help/about dialog (MessageBox for v1; a richer dialog is a follow-up). GetFunction returns the config object for IID_ITfFnConfigure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Localize the language-bar tooltip and the settings dialog. Ainu terms are sourced from the itak.aynu.org glossary (not fabricated): aeynuyep = IME (< まぽ), iyanu = settings, 'Aynu itak' = Ainu language. Script-mode names (katakana/Latin) have no coined Ainu term, so the script names are kept; messages are trilingual. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Superseded — this branch is fully merged into |
Draft — needs Windows testing. Stacked on #1 (retarget to
masterafter #1 merges).Adds a language-bar button that toggles input mode:
Implementation
src/lang_bar.rs:ModeButtonimplementingITfLangBarItemButton+ITfLangBarItem+ITfSource;OnClickflips the mode and notifies the langbar sink (OnUpdate);GetIconloadsmode_kana/mode_latnby resource id.Rc<Cell<Mode>>;would_eatreturns false for letters in Latin mode (passthrough).ActivateEx, removed inDeactivate.resources.rcnow uses numeric ids (101/102/103);IDI_ICONstays icon index 0 (profile icon).Verified here
cargo check+ clippy + fmt green against windows 0.60.Needs Windows check
Button appears in the language bar; clicking toggles the icon; Latin mode types raw letters; Kana mode still converts.