Skip to content

Commit

Permalink
Batak Simalungun (bts) keyboard (#747)
Browse files Browse the repository at this point in the history
* Batak Simalungun (bts) keyboard

New keyboard

* Update jquery.ime.test.fixtures.js

* Update bts-keyboard.js

---------

Co-authored-by: SrishAkaTux <[email protected]>
  • Loading branch information
bennylin and srish authored Oct 2, 2024
1 parent 5f61f9b commit c0874a3
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 1 deletion.
63 changes: 63 additions & 0 deletions rules/bts/bts-keyboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
( function ( $ ) {
'use strict';

var simalungunKbd = {
id: 'bts-keyboard',
name: 'Surat Simalungun',
description: 'QWERTY-based Batak Simalungun keyboard',
date: '2023-07-28',
URL: 'https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods/bts-keyboard',
author: 'Benny Lin',
license: 'GPLv3',
version: '1.0',
patterns: [
[ '(q|Q)', '᯲' ],// 1BF2 ᯲ BATAK PANGOLAT (PANGGOTAP) = virama
[ '(w|W)', 'ᯌ' ],//1BCC ᯌ BATAK LETTER SIMALUNGUN WA
[ 'e', 'ᯩ' ],//1BE9 ᯩ BATAK VOWEL SIGN EE = talinga
[ 'E', 'ᯧ' ],//1BE7 ᯧ BATAK VOWEL SIGN E = kebereten
[ '(r|R)', 'ᯓ' ],//1BD3 ᯓ BATAK LETTER SIMALUNGUN RA
[ 't', 'ᯖ' ],//1BD6 ᯖ BATAK LETTER SOUTHERN TA
[ 'T', 'ᯗ' ],//1BD7 ᯗ BATAK LETTER NORTHERN TA
[ '(y|Y)', 'ᯜ' ],//1BDC ᯜ BATAK LETTER SIMALUNGUN YA
[ 'u', 'ᯯ' ],//1BEF ᯯ BATAK VOWEL SIGN U FOR SIMALUNGUN
[ 'U', 'ᯥ' ],//1BE5 ᯥ BATAK LETTER ina ni surat U
[ 'i', 'ᯪ' ],//1BEA ᯪ BATAK VOWEL SIGN I = ulua
[ 'I', 'ᯤ' ],//1BE4 ᯤ BATAK LETTER ina ni surat I
[ '(o|O)', 'ᯬ' ],//1BEC ᯬ BATAK VOWEL SIGN O = siala ulu
[ '(p|P)', 'ᯈ' ],//1BC8 ᯈ BATAK LETTER SIMALUNGUN PA

[ '(a|A)', 'ᯁ' ],//1BC1 ᯁ BATAK LETTER SIMALUNGUN A
[ '(s|S)', 'ᯙ' ],//1BD9 ᯙ BATAK LETTER SIMALUNGUN SA
[ '(d|D)', 'ᯑ' ],//1BD1 ᯑ BATAK LETTER DA
[ '(f|F)', '᯳' ],//1BF3 ᯳ BATAK PANONGONAN = virama
[ '(g|G)', 'ᯏ' ],//1BCF ᯏ BATAK LETTER SIMALUNGUN GA
[ 'h', 'ᯃ' ],//1BC3 ᯃ BATAK LETTER SIMALUNGUN HA or KA
[ 'H', 'ᯱ' ],//1BF1 ᯱ BATAK CONSONANT SIGN H = hajoringan (-h)
[ '(j|J)', 'ᯐ' ],//1BD0 ᯐ BATAK LETTER JA
[ '(k|K)', 'ᯃ' ],//1BC3 ᯃ BATAK LETTER SIMALUNGUN HA or KA
[ '(l|L)', 'ᯟ' ],//1BDF ᯟ BATAK LETTER SIMALUNGUN LA

[ 'z', 'ᯝ' ],//1BDD ᯝ BATAK LETTER NGA
[ 'Z', 'ᯰ' ],//1BF0 ᯰ BATAK CONSONANT SIGN NG = amisara (-ng)
[ '(x|X)', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA
[ '(c|C)', 'ᯠ' ],//1BE0 ᯠ BATAK LETTER NYA = CA
[ '(v|V)', '᯦' ],//1BE6 ᯦ BATAK SIGN TOMPI
[ '(b|B)', 'ᯅ' ],//1BC5 ᯅ BATAK LETTER BA
[ '(n|N)', 'ᯉ' ],//1BC9 ᯉ BATAK LETTER NA
[ '(m|M)', 'ᯕ' ],//1BD5 ᯕ BATAK LETTER SIMALUNGUN MA

[ '^^', '^' ],
[ '^', 'ᯰ' ],//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( simalungunKbd );
}( jQuery ) );
8 changes: 8 additions & 0 deletions src/jquery.ime.inputmethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
name: 'Toba Transliteration',
source: 'rules/bbc/bbc-transliteration.js'
},
'bts-keyboard': {
name: 'Simalungun Keyboard',
source: 'rules/bts/bts-keyboard.js'
},
'btm-transliteration': {
name: 'Transliteration',
source: 'rules/btm/btm-transliteration.js'
Expand Down Expand Up @@ -1094,6 +1098,10 @@
autonym: 'Batak Toba',
inputmethods: [ 'bbc-transliteration' ]
},
bts: {
autonym: 'Batak Simalungun',
inputmethods: [ 'bts-keyboard' ]
},
btm: {
autonym: 'Batak Mandailing',
inputmethods: [ 'btm-keyboard', 'btm-transliteration' ]
Expand Down
48 changes: 47 additions & 1 deletion test/jquery.ime.test.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,53 @@ var palochkaVariants = {
]
},
{
description: 'Batak Mandailing transliteration test',
description: 'Batak Simalungun keyboard test',
inputmethod: 'bts-keyboard',
tests: [
{ input: 'q', output: '᯲', description: 'Simalungun keyboard - q = pangolat' },
{ input: 'w', output: 'ᯌ', description: 'Simalungun keyboard - wa' },
{ input: 'e', output: 'ᯩ', description: 'Simalungun keyboard = -e' },
{ input: 'r', output: 'ᯓ', description: 'Simalungun keyboard - ra' },
{ input: 't', output: 'ᯖ', description: 'Simalungun keyboard - southern ta' },
{ input: 'y', output: 'ᯜ', description: 'Simalungun keyboard - ya' },
{ input: 'u', output: 'ᯯ', description: 'Simalungun keyboard = -u' },
{ input: 'i', output: 'ᯪ', description: 'Simalungun keyboard = -i' },
{ input: 'o', output: 'ᯬ', description: 'Simalungun keyboard = -o' },
{ input: 'p', output: 'ᯈ', description: 'Simalungun keyboard - pa' },

{ input: 'a', output: 'ᯁ', description: 'Simalungun keyboard - a' },
{ input: 's', output: 'ᯙ', description: 'Simalungun keyboard - sa' },
{ input: 'd', output: 'ᯑ', description: 'Simalungun keyboard - da' },
{ input: 'f', output: '᯳', description: 'Simalungun keyboard - f = panongonan' },
{ input: 'g', output: 'ᯏ', description: 'Simalungun keyboard - ga' },
{ input: 'h', output: 'ᯃ', description: 'Simalungun keyboard - ha = a' },
{ input: 'j', output: 'ᯐ', description: 'Simalungun keyboard - ja' },
{ input: 'k', output: 'ᯃ', description: 'Simalungun keyboard - ka = ha' },
{ input: 'l', output: 'ᯟ', description: 'Simalungun keyboard - la' },

{ input: 'z', output: 'ᯝ', description: 'Simalungun keyboard - z = nga' },
{ input: 'x', output: 'ᯠ', description: 'Simalungun keyboard - x = nya' },
{ input: 'c', output: 'ᯠ', description: 'Simalungun keyboard - ca = nya' },
{ input: 'v', output: '᯦', description: 'Simalungun keyboard - v = tompi' },
{ input: 'b', output: 'ᯅ', description: 'Simalungun keyboard - ba' },
{ input: 'n', output: 'ᯉ', description: 'Simalungun keyboard - na' },
{ input: 'm', output: 'ᯕ', description: 'Simalungun keyboard - ma' },

{ input: 'E', output: 'ᯧ', description: 'Simalungun keyboard - E - kebereten' },
{ input: 'T', output: 'ᯗ', description: 'Simalungun keyboard - northern ta' },
{ input: 'U', output: 'ᯥ', description: 'Simalungun keyboard - U - syllable "u"' },
{ input: 'I', output: 'ᯤ', description: 'Simalungun keyboard - I - syllable "i"' },
{ input: 'H', output: 'ᯱ', description: 'Simalungun keyboard - H - hajoringan "-h"' },
{ input: 'Z', output: 'ᯰ', description: 'Simalungun keyboard - Z - amisara "-ng"' },

{ input: [ [ '4', true ] ], output: '᯼', description: 'Simalungun keyboard - alt-4 - bindu na metek' },
{ input: [ [ '5', true ] ], output: '᯽', description: 'Simalungun keyboard - alt-5 - bindu pinarboras' },
{ input: [ [ '6', true ] ], output: '᯾', description: 'Simalungun keyboard - alt-6 - bindu judul' },
{ input: [ [ '7', true ] ], output: '᯿', description: 'Simalungun keyboard - alt-7 - bindu pangolat' }
]
},
{
description: 'Batak Mandailing transliteration test',
inputmethod: 'btm-transliteration',
tests: [
{ input: 'a', output: 'ᯀ', description: 'Mandailing transliteration a' },
Expand Down

0 comments on commit c0874a3

Please sign in to comment.