diff --git a/rules/szl/szl-tilde.js b/rules/szl/szl-tilde.js new file mode 100644 index 00000000..9719d457 --- /dev/null +++ b/rules/szl/szl-tilde.js @@ -0,0 +1,39 @@ +( function ( $ ) { + 'use strict'; + + var szlTilde = { + id: 'szl-tilde', + name: 'Silesian tilde', + description: 'Silesian alphabets specific keyboard', + date: '2024-08-19', + URL: 'https://github.com/wikimedia/jquery.ime', + author: 'Tomasz Ludyga', + license: 'GPLv3', + version: '1.0', + patterns: [ + [ '~1', 'ō' ], + [ '~2', 'ô' ], + [ '~3', 'ŏ' ], + [ '~4', 'õ' ], + [ '~5', 'ã' ], + [ '~6', 'Ô' ], + [ '~7', 'Ō' ], + [ '~u', 'ů' ], + [ '~s', 'ś' ], + [ '~l', 'ł' ], + [ '~z', 'ż' ], + [ '~x', 'ź' ], + [ '~c', 'ć' ], + [ '~n', 'ń' ], + [ '~U', 'Ů' ], + [ '~S', 'Ś' ], + [ '~L', 'Ł' ], + [ '~Z', 'Ż' ], + [ '~X', 'Ź' ], + [ '~C', 'Ć' ], + [ '~N', 'Ń' ], + ] + }; + + $.ime.register( szlTilde ); +}( jQuery ) ); \ No newline at end of file diff --git a/src/jquery.ime.inputmethods.js b/src/jquery.ime.inputmethods.js index 18009b19..e0a8ac1e 100755 --- a/src/jquery.ime.inputmethods.js +++ b/src/jquery.ime.inputmethods.js @@ -866,6 +866,10 @@ name: 'Normal forms', source: 'rules/sv/sv-normforms.js' }, + 'szl-tilde': { + name: 'Silesian tilde', + source: 'rules/szl/szl-tilde.js' + }, 'ta-99': { name: 'தமிழ்99', source: 'rules/ta/ta-99.js' @@ -1582,6 +1586,10 @@ autonym: 'Svenska', inputmethods: [ 'sv-normforms' ] }, + szl: { + autonym: 'Ślůnski', + inputmethods: [ 'szl-tilde' ] + }, ta: { autonym: 'தமிழ்', inputmethods: [ 'ta-transliteration', 'ta-99', 'ta-inscript', 'ta-bamini', 'ta-inscript2' ] diff --git a/test/jquery.ime.test.fixtures.js b/test/jquery.ime.test.fixtures.js index d0f76f73..5e96f6a2 100644 --- a/test/jquery.ime.test.fixtures.js +++ b/test/jquery.ime.test.fixtures.js @@ -5645,6 +5645,15 @@ var palochkaVariants = { { input: '@^&*()-_=+<>/?', output: '"&/()=\'?+*;:-_', description: 'Serbian keyboard "&/()=\'?+*;:-_' } ] }, + { + description: 'Silesian keyboard test', + inputmethod: 'szl-tilde', + tests: [ + { input: '~u~U~1~2~3~4~5~6~7', output: 'ůŮōôŏõãÔŌ', description: 'Silesian specific letters' }, + { input: '~s~l~z~x~c~n~S~L~Z~X~C~N', output: 'śłżźćńŚŁŻŹĆŃ', description: 'Uncommon letters' }, + { input: 'Dziyń dobry w~1m!', output: 'Dziyń dobry wōm!', description: 'Pratical use case example' } + ] + }, { description: 'Tamil 99 test', inputmethod: 'ta-99',