Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Korean input method #802

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rules/kor/kor-rr.js → rules/ko/ko-rr.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[ '([ᅡ-ᅵ])h', '$1ᇂ' ],

// Use space, hyphen, and apostrophe to disambiguate
// Do nothing, combineJamo will do the work
// Do nothing, combineJamo will do the work
[ '([\- \'])', '$1'],

// Syllable initials
Expand Down Expand Up @@ -62,7 +62,7 @@
[ 'T', 'ᄐ' ],
[ 'p', 'ᄑ' ],
[ 'h', 'ᄒ' ],

// Vowels
// Vowels without consontant initial must have ᄋ prepended
// [^ᄀ-ᄒ]|^ matches the start character or anything but an initial consonant
Expand Down Expand Up @@ -106,7 +106,7 @@
];

var koreanRR = {
id: 'kor-rr',
id: 'ko-rr',
name: 'Korean Revised Romanization',
description: 'Transliteration using Korean revised romanization',
date: '2023-02-04',
Expand All @@ -117,7 +117,7 @@
maxKeyLength: 4,
contextLength: 1,

// This function mirrors the normal behavior in jquery.ime.js,
// This function mirrors the normal behavior in jquery.ime.js,
// except it combines jamo when a new syllable starts
// This version does not support context rules, but we don't need them
patterns: function(input, context) {
Expand All @@ -135,7 +135,7 @@
// Input string match test
if ( regex.test( input ) ) {
result = input.replace(regex, replacement);

// This regex matches jamo that form a syllable so they can be combined
var jamoRegex = /([ᄀ-ᄒ])([ᅡ-ᅵ])([ᆨ-ᇂ])?([ᄀ-ᄒ]|[\- '])(.*)$/;
if (jamoRegex.test(result)) {
Expand Down
8 changes: 4 additions & 4 deletions src/jquery.ime.inputmethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,9 @@
name: 'ಲಿಪ್ಯಂತರಣ',
source: 'rules/kn/kn-transliteration.js'
},
'kor-rr': {
'ko-rr': {
name: 'Korean Revised Romanization',
source: 'rules/kor/kor-rr.js'
source: 'rules/ko/ko-rr.js'
},
'kr-tilde': {
name: 'Kanuri tilde',
Expand Down Expand Up @@ -1466,9 +1466,9 @@
autonym: 'ಕನ್ನಡ',
inputmethods: [ 'kn-transliteration', 'kn-inscript', 'kn-kgp', 'kn-inscript2' ]
},
kor: {
ko: {
autonym: '한국어',
inputmethods: [ 'kor-rr' ]
inputmethods: [ 'ko-rr' ]
},
kr: {
autonym: 'kanuri',
Expand Down
2 changes: 1 addition & 1 deletion test/jquery.ime.test.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -4186,7 +4186,7 @@ var palochkaVariants = {
},
{
description: 'Korean RR test',
inputmethod: 'kor-rr',
inputmethod: 'ko-rr',
tests: [
// Note that RR is meant to romanize from hangul to latin script, but not
// the other way around, so there are some instances where the keystrokes
Expand Down
Loading