From 76a0db24b33559f514a8e829127248bccc43261e Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Thu, 5 Sep 2024 13:24:46 -0400 Subject: [PATCH] Add Jju tilde keyboard (#792) Downstream task: https://phabricator.wikimedia.org/T373928 Co-authored-by: SrishAkaTux --- rules/kaj/kaj-tilde.js | 24 ++++++++++++++++++++++++ src/jquery.ime.inputmethods.js | 8 ++++++++ test/jquery.ime.test.fixtures.js | 9 +++++++++ 3 files changed, 41 insertions(+) create mode 100644 rules/kaj/kaj-tilde.js diff --git a/rules/kaj/kaj-tilde.js b/rules/kaj/kaj-tilde.js new file mode 100644 index 00000000..3a39de20 --- /dev/null +++ b/rules/kaj/kaj-tilde.js @@ -0,0 +1,24 @@ +( function ( $ ) { + 'use strict'; + + var kajTilde = { + id: 'kaj-tilde', + name: 'kaj-tilde', + description: 'Jju input keyboard', + date: '2024-09-03', + URL: 'https://github.com/wikimedia/jquery.ime', + author: 'Amir E. Aharoni', + license: 'GPLv3', + version: '1.0', + patterns: [ + [ '~A', 'A\u0331' ], // A̱ + [ '~a', 'a\u0331' ], // a̱ + [ '~U', 'U\u0331' ], // U̱ + [ '~u', 'u\u0331' ], // u̱ + [ '~/', '\u0301' ], // Combining acute accent + [ '~_', '\u0331' ] // Combining macron below + ] + }; + + $.ime.register( kajTilde ); +}( jQuery ) ); diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index 466978e6..9ee7aff0 100755 --- a/src/jquery.ime.inputmethods.js +++ b/src/jquery.ime.inputmethods.js @@ -464,6 +464,10 @@ name: 'Taqbaylit Alatin tilde', source: 'rules/kab/kab-tilde.js' }, + 'kaj-tilde': { + name: 'Jju tilde', + source: 'rules/kaj/kaj-tilde.js' + }, 'kbp-tilde': { name: 'Kabɩyɛ tilde', source: 'rules/kbp/kbp-tilde.js' @@ -1330,6 +1334,10 @@ autonym: 'Taqbaylit / ⵜⴰⵇⴱⴰⵢⵍⵉⵜ', inputmethods: [ 'kab-tilde', 'ber-tfng' ] }, + kaj: { + autonym: 'Jju', + inputmethods: [ 'kaj-tilde' ] + }, kbd: { autonym: 'адыгэбзэ (къэбэрдеибзэ)', inputmethods: [ 'cyrl-palochka' ] diff --git a/test/jquery.ime.test.fixtures.js b/test/jquery.ime.test.fixtures.js index 8791d183..6fd1ca45 100644 --- a/test/jquery.ime.test.fixtures.js +++ b/test/jquery.ime.test.fixtures.js @@ -2945,6 +2945,15 @@ var palochkaVariants = { { input: '~y~w', output: 'ɣʷ', description: 'Kabyle tilde ɣʷ' } ] }, + { + description: 'Jju tilde test', + inputmethod: 'kaj-tilde', + tests: [ + { input: '~A~a~U~u', output: 'A̱a̱U̱u̱', description: 'Jju tilde A̱a̱U̱u̱' }, + { input: 'n~a~/', output: 'ná̱', description: 'Jju tilde ná̱' }, + { input: 'zi~/', output: 'zí', description: 'Jju tilde zí' } + ] + }, { description: 'Kabiye tilde test', inputmethod: 'kbp-tilde',