Repository navigation
Add Korean Phonetic layout - #873
Conversation
Added Korean phonetic tests for various inputs and outputs.
srish
left a comment
There was a problem hiding this comment.
@Mauroxe Thanks for adding this! I tested typing in the browser.
I left a few comments. The main ones are the missing commas in the tests (which stop the test suite from running), adding the keyboard to the Korean list so it shows in the menu, and few layout related fixes.
|
Thanks for the review. I've redone it to address the mistakes. |
srish
left a comment
There was a problem hiding this comment.
@Mauroxe Thanks for the update! Most of my earlier comments have been addressed, and the tests are passing now. I've left a few more change requests. It would also be helpful if you could resolve the earlier threads that have already been addressed.
srish
left a comment
There was a problem hiding this comment.
Thanks @Mauroxe. I tested the latest version and noticed a few things. I might be missing something, so please correct me if so:
- Lint: the tests pass, but npx eslint rules/ko/ko-phonetic.js still shows some errors, mostly from selection, range and textNode being declared twice in the beforeinput handler, plus a few trailing spaces (lines 15, 108 and 111). Could you fix these?
- Backspace: in Chrome without the handler, Backspace after 가 deleted the whole syllable and I didn't see ᄀ. Which browser and OS did you see it in? With the handler, I also noticed that Cmd+Z after Backspace didn't work in a contenteditable box in Chrome and Safari.
- Shift keys: Shift + a letter (ㅃ, ㄸ, ㄲ) shows an error in the browser console (rule.slice is not a function). This seems to be a bug in the main code (src/jquery.ime.js, around line 176), not in this PR. These keys still work because the insertText part of the beforeinput handler fixes the letter afterwards. When I removed the handler, qoBa gave 오Bㅏ instead of 오빠.
Since the other keyboards here don't change Backspace, would it be possible to remove just the Backspace part (deleteContentBackward) from the beforeinput handler, and keep the insertText part for now so the Shift keys keep working?
|
Thanks a lot @Mauroxe for making all the suggested improvements and for this contribution! |
Summary
This pull request adds phonetic keyboard for korean language.
Details
It's a hangul layout, no transliteration. It types hangul letters, not latin.
Doesn't use romanization. It works a lot faster.
No need to type space after each syllable.
Info: Wiki / SIL documentation - IME
Motivation
Makes korean input on wikipedia easier and faster.
Notes
Backspace fixed to work as in standard layout.