From effe048bd2247c1702a44b50698427dda7266100 Mon Sep 17 00:00:00 2001 From: Benny Lin Date: Fri, 28 Jul 2023 19:30:20 +0700 Subject: [PATCH 1/4] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c3c59209..725b9d96 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ node_modules/ dist/ .eslintcache rules/jv/jv-transliteration - Copy.js +rules/bbc/bbc-transliteration - Copy.js +test/jquery.ime.test.fixtures - Copy.js From 80e6718f5e2f92edfe7cf48a7673b72e244b73d8 Mon Sep 17 00:00:00 2001 From: Benny Lin Date: Fri, 28 Jul 2023 20:43:02 +0700 Subject: [PATCH 2/4] Batak Pakpak (Dairi) (btd) keyboard New keyboard --- rules/btd/btd-keyboard.js | 62 ++++++++++++++++++++++++++++++++ src/jquery.ime.inputmethods.js | 8 +++++ test/jquery.ime.test.fixtures.js | 46 ++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 rules/btd/btd-keyboard.js diff --git a/rules/btd/btd-keyboard.js b/rules/btd/btd-keyboard.js new file mode 100644 index 00000000..36cea926 --- /dev/null +++ b/rules/btd/btd-keyboard.js @@ -0,0 +1,62 @@ +( function ( $ ) { + 'use strict'; + + var pakpakDairiKbd = { + id: 'btd-keyboard', + name: 'Pakpak (Dairi) Keyboard', + description: 'QWERTY-based Batak Pakpak (Dairi) keyboard', + date: '2023-07-28', + URL: 'https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods/btd-keyboard', + author: 'Benny Lin', + version: '1.0', + patterns: [ + [ 'q', '᯲' ],// 1BF2 ᯲ BATAK PANGOLAT (PANGGOTAP) = virama + [ 'w', 'ᯍ' ],//1BCD ᯍ BATAK LETTER PAKPAK WA + [ 'e', 'ᯨ' ],//1BE8 ᯨ BATAK VOWEL SIGN PAKPAK E = ketolongen + [ 'r', 'ᯒ' ],//1BD2 ᯒ BATAK LETTER RA + [ 't', 'ᯖ' ],//1BD6 ᯖ BATAK LETTER SOUTHERN TA + [ 'y', 'ᯛ' ],//1BDB ᯛ BATAK LETTER YA + [ 'u', 'ᯮ' ],//1BEE ᯮ BATAK VOWEL SIGN U = boruta + [ 'i', 'ᯪ' ],//1BEA ᯪ BATAK VOWEL SIGN I = ulua + [ 'o', 'ᯬ' ],//1BEC ᯬ BATAK VOWEL SIGN O = siala ulu + [ 'p', 'ᯇ' ],//1BC7 ᯇ BATAK LETTER PA + + [ 'a', 'ᯀ' ],//1BC0 ᯀ BATAK LETTER A + [ 's', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA + [ 'd', 'ᯑ' ],//1BD1 ᯑ BATAK LETTER DA + [ 'f', '᯳' ],//1BF3 ᯳ BATAK PANONGONAN = virama + [ 'g', 'ᯎ' ],//1BCE ᯎ BATAK LETTER GA + [ 'h', 'ᯀ' ],//1BC0 ᯀ BATAK LETTER A = HA + [ 'j', 'ᯐ' ],//1BD0 ᯐ BATAK LETTER JA + [ 'k', 'ᯂ' ],//1BC2 ᯂ BATAK LETTER HA = KA + [ 'l', 'ᯞ' ],//1BDE ᯞ BATAK LETTER LA + + [ 'z', 'ᯝ' ],//1BDD ᯝ BATAK LETTER NGA + [ 'x', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA + [ 'c', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA = CA + [ 'v', '᯦' ],//1BE6 ᯦ BATAK SIGN TOMPI + [ 'b', 'ᯅ' ],//1BC5 ᯅ BATAK LETTER BA + [ 'n', 'ᯉ' ],//1BC9 ᯉ BATAK LETTER NA + [ 'm', 'ᯔ' ],//1BD4 ᯔ BATAK LETTER MA + + [ 'E', 'ᯧ' ],//1BE7 ᯧ BATAK VOWEL SIGN E = kebereten + [ 'T', 'ᯗ' ],//1BD7 ᯗ BATAK LETTER NORTHERN TA + [ 'U', 'ᯥ' ],//1BE5 ᯥ BATAK LETTER ina ni surat U + [ 'I', 'ᯤ' ],//1BE4 ᯤ BATAK LETTER ina ni surat I + [ 'H', 'ᯱ' ],//1BF1 ᯱ BATAK CONSONANT SIGN H = hajoringan (-h) + [ 'Z', 'ᯰ' ],//1BF0 ᯰ BATAK CONSONANT SIGN NG = amisara (-ng) + [ '^^', '^' ], + [ '^', 'ᯰ' ],//1BF0 ᯰ BATAK CONSONANT SIGN NG = amisara (-ng) + [ '<<', '<' ], + [ '<', 'ᯝ' ]//1BDD ᯝ BATAK LETTER NGA + ], + patterns_x: [ + [ '4', '᯼' ],//1BFC ᯼ BATAK SYMBOL BINDU NA METEK + [ '5', '᯽' ],//1BFD ᯽ BATAK SYMBOL BINDU PINARBORAS + [ '6', '᯾' ],//1BFE ᯾ BATAK SYMBOL BINDU JUDUL + [ '7', '᯿' ]//1BFF ᯿ BATAK SYMBOL BINDU PANGOLAT + ] + }; + + $.ime.register( pakpakDairiKbd ); +}( jQuery ) ); \ No newline at end of file diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index 158d3df8..4231acd7 100755 --- a/src/jquery.ime.inputmethods.js +++ b/src/jquery.ime.inputmethods.js @@ -72,6 +72,10 @@ name: 'Toba Transliteration', source: 'rules/bbc/bbc-transliteration.js' }, + 'btd-keyboard': { + name: 'Pakpak (Dairi) Keyboard', + source: 'rules/btd/btd-keyboard.js' + }, 'bci-tilde': { name: 'Baoulé tilde keyboard', source: 'rules/bci/bci-tilde.js' @@ -1018,6 +1022,10 @@ autonym: 'Batak Toba', inputmethods: [ 'bbc-transliteration' ] }, + btd: { + autonym: 'Batak Pakpak (Dairi)', + inputmethods: [ 'btd-keyboard' ] + }, bci: { autonym: 'wawle', inputmethods: [ 'bci-tilde' ] diff --git a/test/jquery.ime.test.fixtures.js b/test/jquery.ime.test.fixtures.js index d767ae7c..f3f328e1 100644 --- a/test/jquery.ime.test.fixtures.js +++ b/test/jquery.ime.test.fixtures.js @@ -352,6 +352,52 @@ var palochkaVariants = { { input: [ [ '7', true ] ], output: '᯿', description: 'Toba Transliteration - alt-7 - bindu pangolat' } ] }, + { + description: 'Batak Pakpak (Dairi) keyboard test', + inputmethod: 'btd-keyboard', + tests: [ + { input: 'q', output: '᯲', description: 'Pakpak (Dairi) keyboard - q = pangolat' }, + { input: 'w', output: 'ᯍ', description: 'Pakpak (Dairi) keyboard - wa' }, + { input: 'e', output: 'ᯨ', description: 'Pakpak (Dairi) keyboard = -e' }, + { input: 'r', output: 'ᯒ', description: 'Pakpak (Dairi) keyboard - ra' }, + { input: 't', output: 'ᯖ', description: 'Pakpak (Dairi) keyboard - southern ta' }, + { input: 'y', output: 'ᯛ', description: 'Pakpak (Dairi) keyboard - ya' }, + { input: 'u', output: 'ᯮ', description: 'Pakpak (Dairi) keyboard = -u' }, + { input: 'i', output: 'ᯪ', description: 'Pakpak (Dairi) keyboard = -i' }, + { input: 'o', output: 'ᯬ', description: 'Pakpak (Dairi) keyboard = -o' }, + { input: 'p', output: 'ᯇ', description: 'Pakpak (Dairi) keyboard - pa' }, + + { input: 'a', output: 'ᯀ', description: 'Pakpak (Dairi) keyboard - a' }, + { input: 's', output: 'ᯘ', description: 'Pakpak (Dairi) keyboard - sa' }, + { input: 'd', output: 'ᯑ', description: 'Pakpak (Dairi) keyboard - da' }, + { input: 'f', output: '᯳', description: 'Pakpak (Dairi) keyboard - f = panongonan' }, + { input: 'g', output: 'ᯎ', description: 'Pakpak (Dairi) keyboard - ga' }, + { input: 'h', output: 'ᯀ', description: 'Pakpak (Dairi) keyboard - ha = a' }, + { input: 'j', output: 'ᯐ', description: 'Pakpak (Dairi) keyboard - ja' }, + { input: 'k', output: 'ᯂ', description: 'Pakpak (Dairi) keyboard - ka' }, + { input: 'l', output: 'ᯞ', description: 'Pakpak (Dairi) keyboard - la' }, + + { input: 'z', output: 'ᯝ', description: 'Pakpak (Dairi) keyboard - z = nga' }, + { input: 'x', output: 'ᯠ', description: 'Pakpak (Dairi) keyboard - x = nya' }, + { input: 'c', output: 'ᯘ', description: 'Pakpak (Dairi) keyboard - ca = sa' }, + { input: 'v', output: '᯦', description: 'Pakpak (Dairi) keyboard - v = tompi' }, + { input: 'b', output: 'ᯅ', description: 'Pakpak (Dairi) keyboard - ba' }, + { input: 'n', output: 'ᯉ', description: 'Pakpak (Dairi) keyboard - na' }, + { input: 'm', output: 'ᯔ', description: 'Pakpak (Dairi) keyboard - ma' }, + + { input: 'E', output: 'ᯧ', description: 'Pakpak (Dairi) keyboard - E - kebereten' }, + { input: 'T', output: 'ᯗ', description: 'Pakpak (Dairi) keyboard - northern ta' }, + { input: 'U', output: 'ᯥ', description: 'Pakpak (Dairi) keyboard - U - syllable "u"' }, + { input: 'I', output: 'ᯤ', description: 'Pakpak (Dairi) keyboard - I - syllable "i"' }, + { input: 'H', output: 'ᯱ', description: 'Pakpak (Dairi) keyboard - H - hajoringan "-h"' }, + { input: 'Z', output: 'ᯰ', description: 'Pakpak (Dairi) keyboard - Z - amisara "-ng"' }, + + { input: [ [ '4', true ] ], output: '᯼', description: 'Pakpak (Dairi) keyboard - alt-4 - bindu na metek' }, + { input: [ [ '5', true ] ], output: '᯽', description: 'Pakpak (Dairi) keyboard - alt-5 - bindu pinarboras' }, + { input: [ [ '6', true ] ], output: '᯾', description: 'Pakpak (Dairi) keyboard - alt-6 - bindu judul' }, + { input: [ [ '7', true ] ], output: '᯿', description: 'Pakpak (Dairi) keyboard - alt-7 - bindu pangolat' } + ] + }, { description: 'Baoulé tilde test', inputmethod: 'bci-tilde', From dec7efa6adb4cab432b9aaa4fdf15efcdb09968f Mon Sep 17 00:00:00 2001 From: Benny Lin Date: Fri, 28 Jul 2023 20:44:03 +0700 Subject: [PATCH 3/4] Update .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 725b9d96..5b2b8dfa 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,3 @@ node_modules/ dist/ .eslintcache -rules/jv/jv-transliteration - Copy.js -rules/bbc/bbc-transliteration - Copy.js -test/jquery.ime.test.fixtures - Copy.js From 5de0615c8c97ab2893d6b0e92e411728a1eb3141 Mon Sep 17 00:00:00 2001 From: Benny Lin Date: Mon, 31 Jul 2023 17:27:41 +0700 Subject: [PATCH 4/4] Update btd-keyboard.js --- rules/btd/btd-keyboard.js | 55 ++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/rules/btd/btd-keyboard.js b/rules/btd/btd-keyboard.js index 36cea926..c257408b 100644 --- a/rules/btd/btd-keyboard.js +++ b/rules/btd/btd-keyboard.js @@ -3,48 +3,49 @@ var pakpakDairiKbd = { id: 'btd-keyboard', - name: 'Pakpak (Dairi) Keyboard', + name: 'Surat Pakpak (Dairi)', description: 'QWERTY-based Batak Pakpak (Dairi) keyboard', date: '2023-07-28', URL: 'https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods/btd-keyboard', author: 'Benny Lin', + license: 'GPLv3', version: '1.0', patterns: [ - [ 'q', '᯲' ],// 1BF2 ᯲ BATAK PANGOLAT (PANGGOTAP) = virama - [ 'w', 'ᯍ' ],//1BCD ᯍ BATAK LETTER PAKPAK WA + [ '(q|Q)', '᯲' ],// 1BF2 ᯲ BATAK PANGOLAT (PANGGOTAP) = virama + [ '(w|W)', 'ᯍ' ],//1BCD ᯍ BATAK LETTER PAKPAK WA [ 'e', 'ᯨ' ],//1BE8 ᯨ BATAK VOWEL SIGN PAKPAK E = ketolongen - [ 'r', 'ᯒ' ],//1BD2 ᯒ BATAK LETTER RA + [ 'E', 'ᯧ' ],//1BE7 ᯧ BATAK VOWEL SIGN E = kebereten + [ '(r|R)', 'ᯒ' ],//1BD2 ᯒ BATAK LETTER RA [ 't', 'ᯖ' ],//1BD6 ᯖ BATAK LETTER SOUTHERN TA - [ 'y', 'ᯛ' ],//1BDB ᯛ BATAK LETTER YA + [ 'T', 'ᯗ' ],//1BD7 ᯗ BATAK LETTER NORTHERN TA + [ '(y|Y)', 'ᯛ' ],//1BDB ᯛ BATAK LETTER YA [ 'u', 'ᯮ' ],//1BEE ᯮ BATAK VOWEL SIGN U = boruta + [ 'U', 'ᯥ' ],//1BE5 ᯥ BATAK LETTER ina ni surat U [ 'i', 'ᯪ' ],//1BEA ᯪ BATAK VOWEL SIGN I = ulua - [ 'o', 'ᯬ' ],//1BEC ᯬ BATAK VOWEL SIGN O = siala ulu - [ 'p', 'ᯇ' ],//1BC7 ᯇ BATAK LETTER PA + [ 'I', 'ᯤ' ],//1BE4 ᯤ BATAK LETTER ina ni surat I + [ '(o|O)', 'ᯬ' ],//1BEC ᯬ BATAK VOWEL SIGN O = siala ulu + [ '(p|P)', 'ᯇ' ],//1BC7 ᯇ BATAK LETTER PA - [ 'a', 'ᯀ' ],//1BC0 ᯀ BATAK LETTER A - [ 's', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA - [ 'd', 'ᯑ' ],//1BD1 ᯑ BATAK LETTER DA - [ 'f', '᯳' ],//1BF3 ᯳ BATAK PANONGONAN = virama - [ 'g', 'ᯎ' ],//1BCE ᯎ BATAK LETTER GA + [ '(a|A)', 'ᯀ' ],//1BC0 ᯀ BATAK LETTER A + [ '(s|S)', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA + [ '(d|D)', 'ᯑ' ],//1BD1 ᯑ BATAK LETTER DA + [ '(f|F)', '᯳' ],//1BF3 ᯳ BATAK PANONGONAN = virama + [ '(g|G)', 'ᯎ' ],//1BCE ᯎ BATAK LETTER GA [ 'h', 'ᯀ' ],//1BC0 ᯀ BATAK LETTER A = HA - [ 'j', 'ᯐ' ],//1BD0 ᯐ BATAK LETTER JA - [ 'k', 'ᯂ' ],//1BC2 ᯂ BATAK LETTER HA = KA - [ 'l', 'ᯞ' ],//1BDE ᯞ BATAK LETTER LA + [ 'H', 'ᯱ' ],//1BF1 ᯱ BATAK CONSONANT SIGN H = hajoringan (-h) + [ '(j|J)', 'ᯐ' ],//1BD0 ᯐ BATAK LETTER JA + [ '(k|K)', 'ᯂ' ],//1BC2 ᯂ BATAK LETTER HA = KA + [ '(l|L)', 'ᯞ' ],//1BDE ᯞ BATAK LETTER LA [ 'z', 'ᯝ' ],//1BDD ᯝ BATAK LETTER NGA - [ 'x', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA - [ 'c', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA = CA - [ 'v', '᯦' ],//1BE6 ᯦ BATAK SIGN TOMPI - [ 'b', 'ᯅ' ],//1BC5 ᯅ BATAK LETTER BA - [ 'n', 'ᯉ' ],//1BC9 ᯉ BATAK LETTER NA - [ 'm', 'ᯔ' ],//1BD4 ᯔ BATAK LETTER MA - - [ 'E', 'ᯧ' ],//1BE7 ᯧ BATAK VOWEL SIGN E = kebereten - [ 'T', 'ᯗ' ],//1BD7 ᯗ BATAK LETTER NORTHERN TA - [ 'U', 'ᯥ' ],//1BE5 ᯥ BATAK LETTER ina ni surat U - [ 'I', 'ᯤ' ],//1BE4 ᯤ BATAK LETTER ina ni surat I - [ 'H', 'ᯱ' ],//1BF1 ᯱ BATAK CONSONANT SIGN H = hajoringan (-h) [ 'Z', 'ᯰ' ],//1BF0 ᯰ BATAK CONSONANT SIGN NG = amisara (-ng) + [ '(x|X)', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA + [ '(c|C)', 'ᯘ' ],//1BD8 ᯘ BATAK LETTER SA = CA + [ '(v|V)', '᯦' ],//1BE6 ᯦ BATAK SIGN TOMPI + [ '(b|B)', 'ᯅ' ],//1BC5 ᯅ BATAK LETTER BA + [ '(n|N)', 'ᯉ' ],//1BC9 ᯉ BATAK LETTER NA + [ '(m|M)', 'ᯔ' ],//1BD4 ᯔ BATAK LETTER MA + [ '^^', '^' ], [ '^', 'ᯰ' ],//1BF0 ᯰ BATAK CONSONANT SIGN NG = amisara (-ng) [ '<<', '<' ],