Skip to content

Conversation

@naoNao89
Copy link

@naoNao89 naoNao89 commented Jan 12, 2026

Fixes: #138

Bugs fixed:

  1. aw instead of ă (checked wư before awă)
  2. ow instead of ơ (same issue)
  3. uw instead of ư (same issue)
  4. Awă instead of Ă (no case preservation)
  5. No way to type literal w (missing escape sequences)
  6. Vietnamese chars not in long-press popups

Root cause was the loop checking shortest patterns first. Fixed by changing word.indices.reversed() to word.indices for longest-match-first. Added case preservation, escape sequences (ww→w), and ă/ư/ơ to popups.

and 19 tests added

- Created comprehensive test suite for Vietnamese Telex transformations
- Added JUnit dependency to build.gradle.kts for testing support
- Tests cover: basic transformations, case sensitivity, multi-char patterns, edge cases
- 13 tests total: 10 passing, 3 failing (documenting known bugs)
- Failing tests identify bugs in the transformation logic:
  * 'ow' → 'ơ' pattern not working
  * Case-insensitive 'W' handling broken
  * Multi-character 'ww' patterns need fixing
- Tests will pass once transformation logic is corrected
- Remove unused applyRulesCaseInsensitive function
- Add newline at end of file
- Change iteration from backwards to forward (longest-match-first)
- Add case-insensitive matching for Telex rules
- Add case preservation (Aw→Ă, aw→ă, Ow→Ơ, ow→ơ)
- Add Vietnamese chars (ă, ư, ơ) to keyboard popups
- Fix test helpers to use case-insensitive matching
- Add missing 'ww→ư' rule to test suite
- Add 4 new tests for case preservation verification
- Implement escape logic for double character sequences (ww → w)
- Add escape detection before transformation in SimpleKeyboardIME.kt
- Fix test assertion argument order for JUnit 4 compatibility

All 19 Vietnamese Telex tests passing.
@naoNao89 naoNao89 force-pushed the fix/vietnamese-telex-input-bugs branch from edf61bf to 7e01db8 Compare January 13, 2026 12:56
@naoNao89 naoNao89 marked this pull request as ready for review January 13, 2026 13:28
@naoNao89 naoNao89 requested a review from naveensingh as a code owner January 13, 2026 13:28
@naoNao89 naoNao89 changed the title test: add Vietnamese Telex input test suite Fixes Vietnamese Telex input bugs Jan 13, 2026
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.

Vietnamese (telex) does not place ă when expected

1 participant