Input method integration with ULS

The file ext.uls.settingspanel.js is a draft for common
code in the different settings panels.

Change-Id: I057274f16b27b2c18d43d41c1d43f485a18ef0bf
This commit is contained in:
Santhosh Thottingal
2012-10-18 16:27:25 +05:30
parent 90de05cb97
commit f13e474e43
67 changed files with 8867 additions and 22 deletions

View File

@@ -0,0 +1,97 @@
( function ( $ ) {
'use strict';
var paInScript = {
id: 'pa-inscript',
name: 'Punjabi InScript',
description: 'InScript keyboard for Punjabi script',
date: '2012-10-16',
author: '',
license: '',
version: '1.0',
patterns: [
['1', ''],
['2', '੨'],
['3', '੩'],
['4', ''],
['5', '੫'],
['6', '੬'],
['7', '੭'],
['8', '੮'],
['9', '੯'],
['0', ''],
['\\_', '_'],
['\\-', '-'],
['\\+', '+'],
['\\=', '='],
['Q', 'ਔ'],
['q', 'ੌ'],
['W', 'ਐ'],
['w', 'ੈ'],
['E', 'ਆ'],
['e', 'ਾ'],
['R', 'ਈ'],
['r', 'ੀ'],
['T', 'ਊ'],
['t', 'ੂ'],
['Y', 'ਭ'],
['y', 'ਬ'],
['U', 'ਙ'],
['u', 'ਹ'],
['I', 'ਘ'],
['i', 'ਗ'],
['O', 'ਧ'],
['o', 'ਦ'],
['P', 'ਝ'],
['p', 'ਜ'],
['\\{', 'ਢ'],
['\\[', 'ਡ'],
['\\}', 'ਞ'],
['\\]', '਼'],
['A', 'ਓ'],
['a', 'ੋ'],
['S', 'ਏ'],
['s', 'ੇ'],
['D', 'ਅ'],
['d', '੍'],
['F', 'ਇ'],
['f', 'ਿ'],
['G', 'ਉ'],
['g', 'ੁ'],
['H', 'ਫ'],
['h', 'ਪ'],
['J', 'ੜ'],
['j', 'ਰ'],
['K', 'ਖ'],
['k', 'ਕ'],
['L', 'ਥ'],
['l', 'ਤ'],
['\\:', 'ਛ'],
['\\;', 'ਚ'],
['\\"', 'ਠ'],
['\'', 'ਟ'],
['Z', 'ੱ'],
['z', 'ੰ'],
['X', 'ਫ਼'],
['x', 'ਜ਼'],
['C', 'ਣ'],
['c', 'ਮ'],
['V', 'ਂ'],
['v', 'ਨ'],
['B', 'ਞ'],
['b', 'ਵ'],
['N', 'ਲ਼'],
['n', 'ਲ'],
['M', 'ਸ਼'],
['m', 'ਸ'],
['\\<', 'ੳ'],
[',', ','],
['\\>', 'ੲ'],
['\\.', '.'],
['\\?', '?'],
['/', 'ਯ']]
};
$.ime.register( paInScript );
}( jQuery ) );

View File

@@ -0,0 +1,100 @@
( function ( $ ) {
'use strict';
var paPhonetic = {
id: 'pa-phonetic',
name: 'Punjabi Phonetic',
description: 'Punjabi Phonetic',
date: '2012-10-16',
URL: 'http://fedoraproject.org/wiki/I18N/Indic/PunjabiKeyboardLayouts',
author: '',
license: '',
version: '1.0',
patterns: [
['!', ''],
['1', '1'],
['@', '੨'],
['2', '2'],
['#', '੩'],
['3', '3'],
['\\$', ''],
['4', '4'],
['5', '5'],
['6', '6'],
['7', '7'],
['8', '8'],
['\\)', '੯'],
['9', '9'],
['\\),', ''],
['0', '0'],
['Q', 'ਥ'],
['q', 'ਤ'],
['w', 'ਾ'],
['E', 'ਓ'],
['e', 'ੲ'],
['r', 'ਰ'],
['T', 'ਠ'],
['t', 'ਟ'],
['Y', 'ੈ'],
['y', 'ੇ'],
['U', 'ੂ'],
['u', 'ੁ'],
['I', 'ੀ'],
['i', 'ਿ'],
['O', 'ੌ'],
['o', 'ੋ'],
['P', 'ਫ'],
['p', 'ਪ'],
['\\{', '('],
['\\}', ')'],
['A', 'ਅ'],
['a', 'ੳ'],
['S', 'ਸ਼'],
['s', 'ਸ'],
['D', 'ਧ'],
['d', 'ਦ'],
['F', 'ਢ'],
['f', 'ਡ'],
['G', 'ਘ'],
['g', 'ਗ'],
['h', 'ਹ'],
['J', 'ਝ'],
['j', 'ਜ'],
['K', 'ਖ'],
['k', 'ਕ'],
['L', 'ਲ਼'],
['l', 'ਲ'],
['\\', 'ਙ'],
['\\~', '?ੱ'],
['\\`', '?੍ '],
['Z', 'ਗ਼'],
['z', 'ਜ਼'],
['X', 'ਯ'],
['x', 'ਣ'],
['C', 'ਛ'],
['c', 'ਚ'],
['V', 'ੜ'],
['v', 'ਵ'],
['B', 'ਭ'],
['b', 'ਬ'],
['N', 'ਂ'],
['n', 'ਨ'],
['M', 'ੰ'],
['m', 'ਮ'],
['\\<', 'ਖ਼'],
['\\>', 'ੴ'],
['\\.', '?਼'],
['\\?', '?'],
['\\/', 'ਞ'],
['%', '੫'],
['\\^', '੬'],
['&', '੭'],
['\\*', '੮'],
['R', '੍ਰ'],
['H', '੍ਹ'],
['W', 'ਾਂ']]
};
$.ime.register( paPhonetic );
}( jQuery ) );

View File

@@ -0,0 +1,120 @@
( function ( $ ) {
'use strict';
var paTransliteration = {
id: 'pa-transliteration',
name: 'Punjabi Transliteration',
description: 'Punjabi transliteration',
date: '2012-10-16',
URL: 'http://github.com/wikimedia/jquery.ime',
author: 'Amir E. Aharoni, inputs from Saurabh Choudhary and Surinder Wadhawan',
license: 'GPLv3',
version: '1.0',
contextLength: 4,
maxKeyLength: 2,
/* Semi-automatically created from the Hindi transliteration mapping using
* the following Perl substitution:
* s{(?<deva_letter>[ऀ-ॿ])}{chr(ord($+{deva_letter}) + 0x100)}xmsge;
*/
patterns: [
['ਕ੍h', 'c', 'ਚ੍'],
['\\\\([A-Za-z\\>_~\\.0-9])', '\\\\', '$1'],
// ਕ-ਹ is the main range of Indic letters.
// ੜ is an additional unique Gurmukhi letter.
['([ਕ-ਹੜ]਼?)੍a', '$1'], // Short [a] after a consonant with virama removes the virama
['([ਕ-ਹੜ]਼?)੍A', '$1ਾ'], // Long [a] after a consonant with virama removes the virama and adds long [a]
['([ਕ-ਹੜ]਼?)a', '$1ਾ'], // 'aa' gives long [a] - short [a] after a consonant without virama adds long [a]
['([ਕ-ਹੜ]਼?)੍i', '$1ਿ'],
['([ਕ-ਹੜ]਼?)(ਿi|੍I|ੇe)', '$1ੀ'], // 'ii', 'I' and 'ee' give long [i].
['([ਕ-ਹੜ]਼?)੍u', '$1ੁ'],
['([ਕ-ਹੜ]਼?)(ੁu|੍U|ੋo)', '$1ੂ'], // 'uu', 'U' and 'oo' give long [u].
['([ਕ-ਹੜ]਼?)੍e', '$1ੇ'],
['([ਕ-ਹੜ]਼?)(i|੍E)', '$1ੈ'], // 'i' after a consonant without virama or 'E' after a consonant with Virama gives "ai"
['([ਕ-ਹੜ]਼?)੍[oO]', '$1ੋ'],
['([ਕ-ਹੜ]਼?)u', '$1ੌ'], // 'u' after a consonant without virama gives "au"
['([ਕ-ਹੜ])੍\\`', '$1਼੍'], // '`' (backtick) after a consonant with virama adds a nukta before the virama
['ਅa', 'ਆ'], // aa
['(ਓo|ਉu)', 'ਊ'], //oo, uu
['ਅi', 'ਐ'], // ai
['ਅ\\^', 'ੲ'], // a^ (iri - base for vowels)
['ਉ\\^', 'ੳ'], // u^ (ura - base for vowels)
['(ਏe|ਇi)', 'ਈ'], // ee, ii
['ਅu', 'ਔ'], // au
['ਂ[Mm^]', 'ਁ'], // bindi + 'm', 'M', or '^' -> Adak bindi
['ਣ੍N', 'ੰ'], // Tippi - nasalization
['ਕ੍h', 'ਖ੍'], // kh
['ਗ੍h', 'ਘ੍'], // gh
['ਨ੍g', 'ਙ੍'], // ng
['ਚ੍h', 'ਛ੍'], // ch
['ਜ੍h', 'ਝ੍'], // jh
['ਨ੍j', 'ਞ੍'], // nj
['ਟ੍h', 'ਠ੍'], // Th
['ਡ੍h', 'ਢ੍'], // Dh
['ਤ੍h', 'ਥ੍'], // th
['ਦ੍h', 'ਧ੍'], // dh
['ਪ੍h', 'ਫ੍'], // ph
['ਬ੍h', 'ਭ੍'], // bh
['ਸ੍h', 'ਸ਼੍'], // sh
['ਕ਼੍h', 'ਖ਼੍'], // k + nukta + h
['a', 'ਅ'],
['b', 'ਬ੍'],
['c', 'ਚ੍'],
['d', 'ਦ੍'],
['e', 'ਏ'],
['f', 'ਫ੍'],
['F', 'ਫ਼੍'], // With nukta
['g', 'ਗ੍'],
['h', 'ਹ੍'],
['i', 'ਇ'],
['j', 'ਜ੍'],
['k', 'ਕ੍'],
['l', 'ਲ੍'],
['m', 'ਮ੍'],
['n', 'ਨ੍'],
['o', 'ਓ'],
['p', 'ਪ੍'],
['q', 'ੑ'], // Udaat
['r', 'ਰ੍'],
['s', 'ਸ੍'],
['t', 'ਤ੍'],
['u', 'ਉ'],
['(v|w)', 'ਵ੍'],
['y', 'ਯ੍'],
['z', 'ੱ'], // Addak - gemination
['A', 'ਆ'],
['D', 'ਡ੍'],
['H', 'ਃ'], // Visarga
['I', 'ਈ'],
['M', 'ਂ'], // Bindi
['N', 'ਣ੍'],
['R', 'ੜ੍'], // Rra
['S', 'ਸ਼੍'],
['T', 'ਟ੍'],
['U', 'ਊ'],
['X', 'ੴ'], // Ek onkar
['Y', 'ੵ'], // Yakash
['0', ''],
['1', ''],
['2', '੨'],
['3', '੩'],
['4', ''],
['5', '੫'],
['6', '੬'],
['7', '੭'],
['8', '੮'],
['9', '੯'],
['~', '੍'], // Virama
['\\`', '਼'], // Nukta
['।\\.', '॥'], // Double danda, must be before single danda
['\\.', '।']] // Danda
};
$.ime.register( paTransliteration );
}( jQuery ) );