feat(languages): add Korean language support#170
feat(languages): add Korean language support#170max-niederman merged 2 commits intomax-niederman:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e5e978be7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/main.rs
Outdated
| let progress_width = | ||
| ratatui::text::Line::from(test.words[test.current_word].progress.as_str()) | ||
| .width() as u16; | ||
| f.set_cursor(inner_x + progress_width, inner_y); |
There was a problem hiding this comment.
Clamp IME cursor position to the input field width
The cursor X coordinate is computed as inner_x + progress_width without bounding it to the input box width, so when users overtype (or run in a narrow terminal) the cursor is moved outside the Input widget. In those cases IME preedit text can render outside/wrap away from the input area, which defeats the composition-positioning fix for exactly the long-input scenarios it should handle.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Thanks! Fixed in 4b1eca6 — cursor X is now clamped to the input widget bounds.
resources/runtime/language/korean100
Outdated
| 소리 | ||
| 지나다 | ||
| 이제 | ||
| 내다 |
There was a problem hiding this comment.
Trim korean100 preset to 100 words
The korean100 resource includes entries beyond line 100, so -l korean100 actually draws from 106 words instead of the advertised 100. This makes benchmark presets inconsistent with their names (and with other *100 language files), which can skew test comparability for users relying on fixed-size lists.
Useful? React with 👍 / 👎.
resources/runtime/language/korean200
Outdated
| 나이 | ||
| 달 | ||
| 쪽 | ||
| 서로 |
There was a problem hiding this comment.
Trim korean200 preset to 200 words
The korean200 resource has words past line 200, so this preset uses 205 words instead of 200. As with korean100, this breaks the implied contract of count-suffixed language presets and can produce non-comparable results versus other fixed-size word lists.
Useful? React with 👍 / 👎.
|
Thanks for the review! I've addressed the feedback in 4b1eca6:
|
|
Sloplord satsified, looks swell! @max-niederman |
Hey dude, you've mentioned Max like 10 different times in a single day. Maybe chill out a little? |
|
@Craftzman7 I've been emailing him -- I wanted to review all the active PRs, then the issues. He gave me the go-ahead. I understand this looks spammy from the outside. |
|
Kind of comforting someone cares enough to notice :) You should contribute !! |
lol thanks for the concern, but in this case the pings are appreciated |
Add korean100 and korean200 word lists and fix IME cursor positioning in the input box for proper Korean character composition display.
…cursor - korean100: 106 → 100 words - korean200: 205 → 200 words - Clamp IME cursor X position to input widget bounds
4b1eca6 to
320cc5a
Compare
Summary
korean100andkorean200word lists based on Korean word frequency dataDetails
Korean word lists
korean100: 100 most frequently used Korean wordskorean200: 200 most frequently used Korean wordsIME cursor fix
Korean (and other CJK languages) requires IME composition in the terminal. Without proper cursor positioning, the IME preedit text renders at an unexpected location, causing visual overlap. This fix positions the cursor at the end of the input text during the
Teststate so the IME composition preview appears in the correct place.Changed file:
src/main.rsratatui::layout::{Constraint, Direction, Layout}importsTerminal::draw()for theTeststate using the same layout constraints asui.rsTest plan
ttyper -l korean100and verify Korean words display correctlyenglish100) still work as before