Skip to content

v0.2: kana/latin mode-switch language-bar button - #4

Closed
mkpoli wants to merge 3 commits into
rust-migrationfrom
v0.2-mode-ui
Closed

v0.2: kana/latin mode-switch language-bar button#4
mkpoli wants to merge 3 commits into
rust-migrationfrom
v0.2-mode-ui

Conversation

@mkpoli

@mkpoli mkpoli commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Draft — needs Windows testing. Stacked on #1 (retarget to master after #1 merges).

Adds a language-bar button that toggles input mode:

  • Kana (default): romaji → Ainu katakana.
  • Latin: letters pass through unchanged (direct alphabet input).

Implementation

  • src/lang_bar.rs: ModeButton implementing ITfLangBarItemButton + ITfLangBarItem + ITfSource; OnClick flips the mode and notifies the langbar sink (OnUpdate); GetIcon loads mode_kana/mode_latn by resource id.
  • Mode is shared with the key handler via Rc<Cell<Mode>>; would_eat returns false for letters in Latin mode (passthrough).
  • Button added in ActivateEx, removed in Deactivate.
  • resources.rc now uses numeric ids (101/102/103); IDI_ICON stays 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.

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>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5c16ac9-8ef8-4ce5-ae50-9f6055ac7809

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v0.2-mode-ui

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

mkpoli and others added 2 commits June 15, 2026 05:34
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>
@mkpoli

mkpoli commented Jun 15, 2026

Copy link
Copy Markdown
Owner Author

Superseded — this branch is fully merged into integration (verified: git merge-base --is-ancestor passes) and shipped in the v0.2.x releases. It also targets a stale base branch. Closing to declutter; no code is lost. The reconciliation of integration into master is being handled separately.

@mkpoli mkpoli closed this Jun 15, 2026
@mkpoli
mkpoli deleted the v0.2-mode-ui branch June 16, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant