From 5c00740e75fa339b1d262c7864f12c44102e92ad Mon Sep 17 00:00:00 2001 From: Amir Aharoni Date: Thu, 28 Mar 2019 21:20:35 -0700 Subject: [PATCH] Add Sango tilde method --- rules/sg/sg-tilde.js | 24 ++++++++++++++++++++++++ src/jquery.ime.inputmethods.js | 8 ++++++++ test/jquery.ime.test.fixtures.js | 11 +++++++++++ 3 files changed, 43 insertions(+) create mode 100644 rules/sg/sg-tilde.js diff --git a/rules/sg/sg-tilde.js b/rules/sg/sg-tilde.js new file mode 100644 index 00000000..4c130f51 --- /dev/null +++ b/rules/sg/sg-tilde.js @@ -0,0 +1,24 @@ +( function ( $ ) { + 'use strict'; + + var sgTilde = { + id: 'sg-tilde', + name: 'sg-tilde', + description: 'Sango tilde keyboard', + date: '2019-03-28', + URL: 'https://github.com/wikimedia/jquery.ime', + author: 'Amir E. Aharoni', + license: 'GPLv3', + version: '1.0', + patterns: [ + [ '~\\\\', '\u0300' ], // Combining grave + [ '~/', '\u0301' ], // Combining acute + [ '~\\^', '\u0302' ], // Combining circumflex + [ '~\\-', '\u0304' ], // Combining macron + [ '~\\:', '\u0308' ], // Combining diaeresis + [ '~v', '\u030C' ] // Combining caron + ] + }; + + $.ime.register( sgTilde ); +}( jQuery ) ); diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index e77493d2..e4d8ceae 100755 --- a/src/jquery.ime.inputmethods.js +++ b/src/jquery.ime.inputmethods.js @@ -642,6 +642,10 @@ name: 'Normal forms', source: 'rules/se/se-normforms.js' }, + 'sg-tilde': { + name: 'Sängö', + source: 'rules/sg/sg-tilde.js' + }, 'si-singlish': { name: 'සිංග්ලිෂ්', source: 'rules/si/si-singlish.js' @@ -1150,6 +1154,10 @@ autonym: 'Davvisámegiella', inputmethods: [ 'se-normforms' ] }, + sg: { + autonym: 'Sängö', + inputmethods: [ 'sg-tilde' ] + }, shi: { autonym: 'ⵜⴰⵛⵍⵃⵉⵜ', inputmethods: [ 'ber-tfng' ] diff --git a/test/jquery.ime.test.fixtures.js b/test/jquery.ime.test.fixtures.js index 66dba01b..1e9f6a02 100644 --- a/test/jquery.ime.test.fixtures.js +++ b/test/jquery.ime.test.fixtures.js @@ -3776,6 +3776,17 @@ var palochkaVariants = { { input: '?', output: '؟', description: 'Southern Kurdish Keyboard Layout: ? -> ؟' } ] }, + { + description: 'Sängö tilde test', + inputmethod: 'sg-tilde', + tests: [ + { input: 'se~^hi~:nga~:ngo~:', output: 'sêhïngängö', description: 'Sängö tilde test sêhïngängö' }, + { input: 'angba~^', output: 'angbâ', description: 'Sängö tilde test angbâ' }, + { input: 'TE~/LE~/CHARGENGO', output: 'TÉLÉCHARGENGO', description: 'Sängö tilde test TÉLÉCHARGENGO' }, + { input: 'Kembe~/', output: 'Kembé', description: 'Sängö tilde test Kembé' }, + { input: 'Mbre~\\s', output: 'Mbrès', description: 'Sängö tilde test Mbrès' } + ] + }, { description: 'Sinhala Wijesekara transliteration tests', inputmethod: 'si-wijesekara',