Update jquery.ime from upstream and a fix in default preferences

Default preferences are kept while loading from localstorage. It may
be empty first time. Handling that case.

Change-Id: If5780006120e401a4df1171146760692b8963363
This commit is contained in:
Santhosh Thottingal
2012-10-25 17:18:42 +05:30
committed by Gerrit Code Review
parent 66b2badb5c
commit 5cbad377e0
9 changed files with 26 additions and 32 deletions

View File

@@ -183,4 +183,4 @@ div.ime-language-list {
.imeselector-menu li { .imeselector-menu li {
position: relative; position: relative;
} }

View File

@@ -1022,6 +1022,7 @@
if ( !language ) { if ( !language ) {
continue; continue;
} }
$languageItem = $( '<a>' ).attr( 'href', '#' ).text( language.autonym ); $languageItem = $( '<a>' ).attr( 'href', '#' ).text( language.autonym );
$language = $( '<li class="ime-lang">' ).attr( 'lang', languageCode ); $language = $( '<li class="ime-lang">' ).attr( 'lang', languageCode );
$language.append( $languageItem ); $language.append( $languageItem );

View File

@@ -10,7 +10,7 @@
author: 'Junaid P V', author: 'Junaid P V',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLensgth: 4, contextLength: 4,
maxKeyLength: 5, maxKeyLength: 5,
patterns: [ patterns: [
['([ক-হড়ঢ়য়])্?ররi','[^o`]', '$1ৃ'], ['([ক-হড়ঢ়য়])্?ররi','[^o`]', '$1ৃ'],

View File

@@ -16,13 +16,8 @@
'use strict'; 'use strict';
// All the characters are very similar in appearance, // All the characters are very similar in appearance,
// so it's better to give them names to avoid confusion. // so it's better to give them names to avoid confusion.
var cyrlPalochka, palochka, latinSmallL, latinCapitalI, ukrainianCapitalI, digitOne; var cyrlPalochka;
palochka = 'c';
latinSmallL = 'l';
latinCapitalI = 'I';
ukrainianCapitalI = 'І';
digitOne = '1';
cyrlPalochka = { cyrlPalochka = {
id: 'cyrl-palochka', id: 'cyrl-palochka',
@@ -33,17 +28,15 @@
author: 'Amir E. Aharoni', author: 'Amir E. Aharoni',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 0,
maxKeyLength: 2,
patterns: [ patterns: [
[ latinSmallL, palochka ], [ 'l', 'Ӏ' ],
[ latinCapitalI, palochka ], [ 'I', 'Ӏ' ],
[ ukrainianCapitalI, palochka ] ], [ 'І', 'Ӏ' ] ],
patterns_x: [ patterns_x: [
[ digitOne, palochka ], [ '1', 'Ӏ' ],
[ 'д', palochka ], [ 'д', 'Ӏ' ],
[ 'ш', palochka ], [ 'ш', 'Ӏ' ],
[ 'Ш', palochka ] ] [ 'Ш', 'Ӏ' ] ]
}; };
$.ime.register( cyrlPalochka ); $.ime.register( cyrlPalochka );

View File

@@ -10,8 +10,8 @@
author: 'Jaldeep R Vasavada ([[User:JaldeepVasavada]]) / Amir E. Aharoni ([[User:Amire80]])', author: 'Jaldeep R Vasavada ([[User:JaldeepVasavada]]) / Amir E. Aharoni ([[User:Amire80]])',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 4, contextLength: 2,
maxKeyLength: 2, maxKeyLength: 4,
patterns: [ patterns: [
['ક્h', 'c', 'ચ'], ['ક્h', 'c', 'ચ'],
['\\\\([A-Za-z\\>_~\\.0-9])', '\\\\', '$1'], ['\\\\([A-Za-z\\>_~\\.0-9])', '\\\\', '$1'],

View File

@@ -9,8 +9,8 @@
author: 'Pathak A B', author: 'Pathak A B',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 4, contextLength: 2,
maxKeyLength: 2, maxKeyLength: 4,
patterns: [ patterns: [
['च्h', 'c', 'च्'], // ch ['च्h', 'c', 'च्'], // ch
['च्h', 'ch', 'छ्'], // chh ['च्h', 'ch', 'छ्'], // chh

View File

@@ -10,8 +10,8 @@
author: 'Amir E. Aharoni, inputs from Saurabh Choudhary and Surinder Wadhawan', author: 'Amir E. Aharoni, inputs from Saurabh Choudhary and Surinder Wadhawan',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 4, contextLength: 2,
maxKeyLength: 2, maxKeyLength: 4,
/* Semi-automatically created from the Hindi transliteration mapping using /* Semi-automatically created from the Hindi transliteration mapping using
* the following Perl substitution: * the following Perl substitution:
* s{(?<deva_letter>[ऀ-ॿ])}{chr(ord($+{deva_letter}) + 0x100)}xmsge; * s{(?<deva_letter>[ऀ-ॿ])}{chr(ord($+{deva_letter}) + 0x100)}xmsge;

View File

@@ -10,8 +10,8 @@
author: 'Junaid P V', author: 'Junaid P V',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 2, contextLength: 0,
maxKeyLength: 0, maxKeyLength: 2,
patterns: [ patterns: [
['`', '\u0DCA\u200D\u0DBB'], ['`', '\u0DCA\u200D\u0DBB'],
['~', '\u0DBB\u0DCA\u200D'], ['~', '\u0DBB\u0DCA\u200D'],
@@ -43,7 +43,7 @@
['l', 'ක'], ['l', 'ක'],
[';', 'ත'], [';', 'ත'],
['\'', '.'], ['\'', '.'],
['z', '\''], ['z', '\''],
['x', ''], ['x', ''],
['c', 'ජ'], ['c', 'ජ'],
['v', 'ඩ'], ['v', 'ඩ'],

View File

@@ -10,8 +10,8 @@
author: 'Veeven and Junaid P V', author: 'Veeven and Junaid P V',
license: 'GPLv3', license: 'GPLv3',
version: '1.0', version: '1.0',
contextLength: 4, contextLength: 1,
maxKeyLength: 1, maxKeyLength: 4,
patterns: [ patterns: [
['(మ్|న్)b', 'ంబ్'], ['(మ్|న్)b', 'ంబ్'],
['(మ్|న్)B', 'ంభ్'], ['(మ్|న్)B', 'ంభ్'],
@@ -67,8 +67,8 @@
// ఉ // ఉ
['([క-హ])్u', '$1ు'], ['([క-హ])్u', '$1ు'],
// ఊ // ఊ
['([క-హ])(ుu|ు\'|ుa|్U)', '', '$1ూ'], ['([క-హ])(ుu|ు\'|ుa|్U)', '$1ూ'],
['([క-హ])ొo', 'o', '$1ూ'], ['([క-హ])ొo', 'o', '$1ూ'],
// ఋ // ఋ
['([క-హ])్R', '$1ృ'], ['([క-హ])్R', '$1ృ'],
['([క-హ])్ర్\'', '$1ృ'], ['([క-హ])్ర్\'', '$1ృ'],
@@ -116,8 +116,8 @@
['అe', 'a', 'ఏ'], ['అe', 'a', 'ఏ'],
['ఎi', 'ఐ'], ['ఎi', 'ఐ'],
['అi', 'a', 'ఐ'], ['అi', 'a', 'ఐ'],
['ఒ(a|\')', '', 'ఓ'], ['ఒ(a|\')', '', 'ఓ'],
['అo', 'a', 'ఓ'], ['అo', 'a', 'ఓ'],
['ఒ(u|w)', 'ఔ'], ['ఒ(u|w)', 'ఔ'],
['అu', 'a', 'ఔ'], ['అu', 'a', 'ఔ'],
['ఋ(u|\')', 'ౠ'], ['ఋ(u|\')', 'ౠ'],