From f06e49b65431871959559d2fc51b7f25eccaa69f Mon Sep 17 00:00:00 2001 From: Benny Lin Date: Fri, 28 Jul 2023 20:22:15 +0700 Subject: [PATCH] Batak Angkola (akb) keyboard New keyboard --- rules/akb/akb-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/akb/akb-keyboard.js diff --git a/rules/akb/akb-keyboard.js b/rules/akb/akb-keyboard.js new file mode 100644 index 00000000..c0b82141 --- /dev/null +++ b/rules/akb/akb-keyboard.js @@ -0,0 +1,62 @@ +( function ( $ ) { + 'use strict'; + + var angkolaKbd = { + id: 'akb-keyboard', + name: 'Angkola Keyboard', + description: 'QWERTY-based Batak Angkola keyboard', + date: '2023-07-28', + URL: 'https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods/akb-keyboard', + author: 'Benny Lin', + version: '1.0', + patterns: [ + [ 'q', '᯲' ],// 1BF2 ᯲ BATAK PANGOLAT (PANGGOTAP) = virama + [ 'w', 'ᯋ' ],//1BCB ᯋ BATAK LETTER WA + [ 'e', 'ᯩ' ],//1BE9 ᯩ BATAK VOWEL SIGN EE = talinga + [ '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', 'ᯂ' ],//1BC2 ᯂ BATAK LETTER HA + [ 'j', 'ᯐ' ],//1BD0 ᯐ BATAK LETTER JA + [ 'k', 'ᯂ' ],//1BC2 ᯂ BATAK LETTER HA + [ 'l', 'ᯞ' ],//1BDE ᯞ BATAK LETTER LA + + [ 'z', 'ᯝ' ],//1BDD ᯝ BATAK LETTER NGA + [ 'x', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA + [ 'c', 'ᯡ' ],//1BE1 ᯡ BATAK LETTER 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( angkolaKbd ); +}( jQuery ) ); \ No newline at end of file diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index 158d3df8..eed9ce32 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' }, + 'akb-keyboard': { + name: 'Angkola Keyboard', + source: 'rules/akb/akb-keyboard.js' + }, 'bci-tilde': { name: 'Baoulé tilde keyboard', source: 'rules/bci/bci-tilde.js' @@ -1018,6 +1022,10 @@ autonym: 'Batak Toba', inputmethods: [ 'bbc-transliteration' ] }, + akb: { + autonym: 'Batak Angkola', + inputmethods: [ 'akb-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..741f461b 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 Angkola keyboard test', + inputmethod: 'akb-keyboard', + tests: [ + { input: 'q', output: '᯲', description: 'Angkola keyboard - q = pangolat' }, + { input: 'w', output: 'ᯋ', description: 'Angkola keyboard - wa' }, + { input: 'e', output: 'ᯩ', description: 'Angkola keyboard = -e' }, + { input: 'r', output: 'ᯒ', description: 'Angkola keyboard - ra' }, + { input: 't', output: 'ᯖ', description: 'Angkola keyboard - southern ta' }, + { input: 'y', output: 'ᯛ', description: 'Angkola keyboard - ya' }, + { input: 'u', output: 'ᯮ', description: 'Angkola keyboard = -u' }, + { input: 'i', output: 'ᯪ', description: 'Angkola keyboard = -i' }, + { input: 'o', output: 'ᯬ', description: 'Angkola keyboard = -o' }, + { input: 'p', output: 'ᯇ', description: 'Angkola keyboard - pa' }, + + { input: 'a', output: 'ᯀ', description: 'Angkola keyboard - a' }, + { input: 's', output: 'ᯘ', description: 'Angkola keyboard - sa' }, + { input: 'd', output: 'ᯑ', description: 'Angkola keyboard - da' }, + { input: 'f', output: '᯳', description: 'Angkola keyboard - f = panongonan' }, + { input: 'g', output: 'ᯎ', description: 'Angkola keyboard - ga' }, + { input: 'h', output: 'ᯂ', description: 'Angkola keyboard - ha' }, + { input: 'j', output: 'ᯐ', description: 'Angkola keyboard - ja' }, + { input: 'k', output: 'ᯂ', description: 'Angkola keyboard - ka = ha' }, + { input: 'l', output: 'ᯞ', description: 'Angkola keyboard - la' }, + + { input: 'z', output: 'ᯝ', description: 'Angkola keyboard - z = nga' }, + { input: 'x', output: 'ᯠ', description: 'Angkola keyboard - x = nya' }, + { input: 'c', output: 'ᯡ', description: 'Angkola keyboard - ca = sa+tompi' }, + { input: 'v', output: '᯦', description: 'Angkola keyboard - v = tompi' }, + { input: 'b', output: 'ᯅ', description: 'Angkola keyboard - ba' }, + { input: 'n', output: 'ᯉ', description: 'Angkola keyboard - na' }, + { input: 'm', output: 'ᯔ', description: 'Angkola keyboard - ma' }, + + { input: 'E', output: 'ᯧ', description: 'Angkola keyboard - E - kebereten' }, + { input: 'T', output: 'ᯗ', description: 'Angkola keyboard - northern ta' }, + { input: 'U', output: 'ᯥ', description: 'Angkola keyboard - U - syllable "u"' }, + { input: 'I', output: 'ᯤ', description: 'Angkola keyboard - I - syllable "i"' }, + { input: 'H', output: 'ᯱ', description: 'Angkola keyboard - H - hajoringan "-h"' }, + { input: 'Z', output: 'ᯰ', description: 'Angkola keyboard - Z - amisara "-ng"' }, + + { input: [ [ '4', true ] ], output: '᯼', description: 'Angkola keyboard - alt-4 - bindu na metek' }, + { input: [ [ '5', true ] ], output: '᯽', description: 'Angkola keyboard - alt-5 - bindu pinarboras' }, + { input: [ [ '6', true ] ], output: '᯾', description: 'Angkola keyboard - alt-6 - bindu judul' }, + { input: [ [ '7', true ] ], output: '᯿', description: 'Angkola keyboard - alt-7 - bindu pangolat' } + ] + }, { description: 'Baoulé tilde test', inputmethod: 'bci-tilde',