From 1565d60e99b99e9f8f7acadf4b704d8dd41fbaa1 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Mon, 1 Jul 2024 10:56:34 -0400 Subject: [PATCH] Add Edo tilde keyboard The language was recently added to translatewiki. --- rules/bin/bin-tilde.js | 22 ++++++++++++++++++++++ src/jquery.ime.inputmethods.js | 8 ++++++++ test/jquery.ime.test.fixtures.js | 10 ++++++++++ 3 files changed, 40 insertions(+) create mode 100644 rules/bin/bin-tilde.js diff --git a/rules/bin/bin-tilde.js b/rules/bin/bin-tilde.js new file mode 100644 index 00000000..af9c6b73 --- /dev/null +++ b/rules/bin/bin-tilde.js @@ -0,0 +1,22 @@ +( function ( $ ) { + 'use strict'; + + var binTilde = { + id: 'bin-tilde', + name: 'bin-tilde', + description: 'Edo input keyboard - tilde', + date: '2024-07-01', + URL: 'https://github.com/wikimedia/jquery.ime', + author: 'Amir E. Aharoni', + license: 'GPLv3', + version: '1.0', + patterns: [ + [ '~E', 'Ẹ' ], + [ '~e', 'ẹ' ], + [ '~O', 'Ọ' ], + [ '~o', 'ọ' ] + ] + }; + + $.ime.register( binTilde ); +}( jQuery ) ); diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index 319378c6..3bd05944 100755 --- a/src/jquery.ime.inputmethods.js +++ b/src/jquery.ime.inputmethods.js @@ -108,6 +108,10 @@ name: 'روچ کپتین بلوچی', source: 'rules/bgn/bgn-kbd.js' }, + 'bin-tilde': { + name: 'Edo tilde', + source: 'rules/bin/bin-tilde.js' + }, 'bkm-tilde': { name: 'Kom tilde', source: 'rules/bkm/bkm-tilde.js' @@ -1058,6 +1062,10 @@ autonym: 'روچ کپتین بلوچی', inputmethods: [ 'bgn-kbd' ] }, + bin: { + autonym: 'Ẹdo', + inputmethods: [ 'bin-tilde' ] + }, bho: { autonym: 'भोजपुरी', inputmethods: [ 'hi-transliteration' ] diff --git a/test/jquery.ime.test.fixtures.js b/test/jquery.ime.test.fixtures.js index f8776f18..39cb92a0 100644 --- a/test/jquery.ime.test.fixtures.js +++ b/test/jquery.ime.test.fixtures.js @@ -576,6 +576,16 @@ var palochkaVariants = { { input: '?', output: '؟', description: 'Western Baluchi Keyboard Layout: ? -> ؟' } ] }, + { + description: 'Edo tilde test', + inputmethod: 'bin-tilde', + tests: [ + { input: '~E', output: 'Ẹ', description: 'Edo tilde ~E -> Ẹ' }, + { input: '~e', output: 'ẹ', description: 'Edo tilde ~e -> ẹ' }, + { input: '~O', output: 'Ọ', description: 'Edo tilde ~O -> Ọ' }, + { input: '~o', output: 'ọ', description: 'Edo tilde ~o -> ọ' } + ] + }, { description: 'Kom tilde test', inputmethod: 'bkm-tilde',