Skip to content

Commit

Permalink
Add Mansi backslash keyboard (#812)
Browse files Browse the repository at this point in the history
Using backslash instead of tilde because
tilde is usually not available on Russian keyboards.

Downstream task:
https://phabricator.wikimedia.org/T375944

Co-authored-by: SrishAkaTux <[email protected]>
  • Loading branch information
amire80 and srish authored Nov 6, 2024
1 parent ea14671 commit c49a03d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
40 changes: 40 additions & 0 deletions rules/mns/mns-backslash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
( function ( $ ) {
'use strict';

var mnsBackslash = {
id: 'mns-backslash',
name: 'mns-backslash',
description: 'Mansi backslash keyboard',
date: '2024-11-05',
URL: 'https://github.com/wikimedia/jquery.ime',
author: 'Amir E. Aharoni',
license: 'GPLv3',
version: '1.0',
patterns: [
[ '\\\\А', 'А̄' ],
[ '\\\\а', 'а̄' ],
[ '\\\\Е', 'Е̄' ],
[ '\\\\е', 'е̄' ],
[ '\\\\Ё', 'Ё̄' ],
[ '\\\\ё', 'ё̄' ],
[ '\\\\И', 'Ӣ' ],
[ '\\\\и', 'ӣ' ],
[ '\\\\Н', 'Ӈ' ],
[ '\\\\н', 'ӈ' ],
[ '\\\\О', 'О̄' ],
[ '\\\\о', 'о̄' ],
[ '\\\\У', 'Ӯ' ],
[ '\\\\у', 'ӯ' ],
[ '\\\\Ы', 'Ы̄' ],
[ '\\\\ы', 'ы̄' ],
[ '\\\\Э', 'Э̄' ],
[ '\\\\э', 'э̄' ],
[ '\\\\Ю', 'Ю̄' ],
[ '\\\\ю', 'ю̄' ],
[ '\\\\Я', 'Я̄' ],
[ '\\\\я', 'я̄' ]
]
};

$.ime.register( mnsBackslash );
}( jQuery ) );
8 changes: 8 additions & 0 deletions src/jquery.ime.inputmethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@
name: 'ইনস্ক্ৰিপ্ট ২',
source: 'rules/mni/mni-inscript2.js'
},
'mns-backslash': {
name: 'Mansi backslash',
source: 'rules/mns/mns-backslash.js'
},
'mnw-simplified-anonta': {
name: 'Mon Simplified Anonta',
source: 'rules/mnw/mnw-simplified-anonta.js'
Expand Down Expand Up @@ -1594,6 +1598,10 @@
autonym: 'Manipuri',
inputmethods: [ 'mni-inscript2' ]
},
mns: {
autonym: 'ма̄ньси',
inputmethods: [ 'mns-backslash' ]
},
mnw: {
autonym: 'ဘာသာမန်',
inputmethods: [ 'mnw-simplified-anonta' ]
Expand Down
7 changes: 7 additions & 0 deletions test/jquery.ime.test.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -4841,6 +4841,13 @@ var palochkaVariants = {
{ input: 'M<?', output: 'শষয', description: 'Manipuri Bengali InScript 2 M<?' }
]
},
{
description: 'Mansi backslash test',
inputmethod: 'mns-backslash',
tests: [
{ input: '\\А\\а\\Е\\е\\Ё\\ё\\И\\и\\Н\\н\\О\\о\\У\\у\\Ы\\ы\\Э\\э\\Ю\\ю\\Я\\я', output: 'А̄а̄Е̄е̄Ё̄ё̄ӢӣӇӈО̄о̄ӮӯЫ̄ы̄Э̄э̄Ю̄ю̄Я̄я̄', description: 'Mansi backslash test' }
]
},
{
description: 'Mon Simplified Anonta test',
inputmethod: 'mnw-simplified-anonta',
Expand Down

0 comments on commit c49a03d

Please sign in to comment.