diff --git a/lib/jquery.ime/css/jquery.ime.css b/lib/jquery.ime/css/jquery.ime.css index e0a63972..3506912b 100644 --- a/lib/jquery.ime/css/jquery.ime.css +++ b/lib/jquery.ime/css/jquery.ime.css @@ -1,5 +1,8 @@ .imeselector { position: absolute; + /* Fix rgba fallback bug - http://css-tricks.com/ie-background-rgb-bug */ + /* @embed */ + background: url('../images/ime-active.png') no-repeat 3px center #fff; /* @embed */ background: url('../images/ime-active.png') no-repeat 3px center rgba(255,255,255,0.75); cursor: pointer; @@ -9,7 +12,7 @@ box-shadow: 0 1px 3px 0 #777; margin-top: 0; text-align: left; - font-family: 'sans'; + font-family: sans-serif; white-space: nowrap; z-index: 9999; } @@ -139,6 +142,20 @@ span.ime-disable-shortcut { top: -6px; } +.imeselector-menu.position-top:before { + border-bottom: 0 none; + border-top: 7px solid #888; + top: auto; + bottom: -7px; +} + +.imeselector-menu.position-top:after { + border-bottom: 0 none; + border-top: 6px solid #FFFFFF; + top: auto; + bottom: -6px; +} + .imeselector-menu .checked { /* @embed */ background: url(../images/tick.png) 4px center no-repeat; diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 2ae80e78..88d5d36c 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,7 +1,11 @@ +/*! jquery.ime - v0.1.0 - 2013-01-16 +* https://github.com/wikimedia/jquery.ime +* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */ + ( function ( $ ) { 'use strict'; - function IME ( element, options ) { + function IME( element, options ) { this.$element = $( element ); // This needs to be delayed here since extending language list happens at DOM ready $.ime.defaults.languages = arrayKeys( $.ime.languages ); @@ -108,14 +112,14 @@ // Get the current caret position. The user may have selected text to overwrite, // so get both the start and end position of the selection. If there is no selection, // startPos and endPos will be equal. - pos = getCaretPosition( this.$element ); + pos = this.getCaretPosition( this.$element ); startPos = pos[0]; endPos = pos[1]; // Get the last few characters before the one the user just typed, // to provide context for the transliteration regexes. // We need to append c because it hasn't been added to $this.val() yet - input = lastNChars( this.$element.val() || this.$element.text(), startPos, + input = this.lastNChars( this.$element.val() || this.$element.text(), startPos, this.inputmethod.maxKeyLength ) + c; @@ -136,7 +140,7 @@ } // Drop a common prefix, if any - divergingPos = firstDivergence( input, replacement ); + divergingPos = this.firstDivergence( input, replacement ); input = input.substring( divergingPos ); replacement = replacement.substring( divergingPos ); replaceText( this.$element, replacement, startPos - input.length + 1, endPos ); @@ -172,8 +176,14 @@ }, setLanguage: function ( languageCode ) { + if ( $.inArray( languageCode, this.options.languages ) === -1 ) { + debug( 'Language ' + languageCode + ' is not known to jquery.ime.' ); + return false; + } + this.language = languageCode; $.ime.preferences.setLanguage( languageCode ); + return true; }, getLanguage: function () { @@ -209,21 +219,56 @@ } ).fail( function ( jqxhr, settings, exception ) { debug( 'Error in loading inputmethod ' + name + ' Exception: ' + exception ); } ); + }, + + // Returns an array [start, end] of the beginning + // and the end of the current selection in $element + getCaretPosition: function ( $element ) { + return getCaretPosition( $element ); + }, + + /** + * Find the point at which a and b diverge, i.e. the first position + * at which they don't have matching characters. + * + * @param a String + * @param b String + * @return Position at which a and b diverge, or -1 if a === b + */ + firstDivergence: function ( a, b ) { + return firstDivergence( a, b ); + }, + + /** + * Get the n characters in str that immediately precede pos + * Example: lastNChars( 'foobarbaz', 5, 2 ) === 'ba' + * + * @param str String to search in + * @param pos Position in str + * @param n Number of characters to go back from pos + * @return Substring of str, at most n characters long, immediately preceding pos + */ + lastNChars: function ( str, pos, n ) { + return lastNChars( str, pos, n ); } }; $.fn.ime = function ( option ) { return this.each( function () { - var $this = $( this ), - data = $this.data( 'ime' ), + var data, + $this = $( this ), options = typeof option === 'object' && option; - if ( $this.prop( 'readonly' ) || $this.prop( 'disabled' ) ) { - return; - } - if ( $this.hasClass( 'noime' ) ) { + // Some exclusions: IME shouldn't be applied to textareas with + // these properties. + if ( $this.prop( 'readonly' ) || + $this.prop( 'disabled' ) || + $this.hasClass( 'noime' ) ) { return; } + + data = $this.data( 'ime' ); + if ( !data ) { data = new IME( this, options ); $this.data( 'ime', data ); @@ -257,15 +302,14 @@ }; // private function for debugging - function debug ( $obj ) { + function debug( $obj ) { if ( window.console && window.console.log ) { window.console.log( $obj ); } } - /** - * - */ + // Returns an array [start, end] of the beginning + // and the end of the current selection in $element function getCaretPosition( $element ) { var el = $element.get( 0 ), start = 0, @@ -330,9 +374,6 @@ } } - /** - * - */ function replaceText( $element, replacement, start, end ) { var element = $element.get( 0 ), selection, @@ -382,7 +423,7 @@ * @param b String * @return Position at which a and b diverge, or -1 if a === b */ - function firstDivergence ( a, b ) { + function firstDivergence( a, b ) { var minLength, i; minLength = a.length < b.length ? a.length : b.length; @@ -405,7 +446,7 @@ * @param n Number of characters to go back from pos * @return Substring of str, at most n characters long, immediately preceding pos */ - function lastNChars ( str, pos, n ) { + function lastNChars( str, pos, n ) { if ( n === 0 ) { return ''; } else if ( pos <= n ) { @@ -422,511 +463,6 @@ } ); return rv; } - -}( jQuery ) ); - -( function ( $ ) { - 'use strict'; - - $.extend( $.ime.sources, { - 'am-transliteration': { - name: 'Transliteration', - source: 'rules/am/am-transliteration.js' - }, - 'as-avro': { - name: 'অভ্ৰ', - source: 'rules/as/as-avro.js' - }, - 'as-bornona': { - name: 'বৰ্ণনা', - source: 'rules/as/as-bornona.js' - }, - 'as-inscript': { - name: 'ইন্‌স্ক্ৰিপ্ত', - source: 'rules/as/as-inscript.js' - }, - 'as-transliteration': { - name: 'প্ৰতিৰূপান্তৰণ', - source: 'rules/as/as-transliteration.js' - }, - 'be-latin': { - name: 'Łacinka', - source: 'rules/be/be-latin.js' - }, - 'be-transliteration': { - name: 'Transliteration', - source: 'rules/be/be-transliteration.js' - }, - 'ber-tfng': { - name: 'Tifinagh', - source: 'rules/ber/ber-tfng.js' - }, - 'bn-avro': { - name: 'Avro', - source: 'rules/bn/bn-avro.js' - }, - 'bn-inscript': { - name: 'ইন্‌স্ক্ৰিপ্ত', - source: 'rules/bn/bn-inscript.js' - }, - 'bn-nkb': { - name: 'National Keyboard', - source: 'rules/bn/bn-nkb.js' - }, - 'bn-probhat': { - name: 'Probhat', - source: 'rules/bn/bn-probhat.js' - }, - 'brx-inscript': { - name: 'Inscript', - source: 'rules/brx/brx-inscript.js' - }, - 'cyrl-palochka': { - name: 'Palochka', - source: 'rules/cyrl/cyrl-palochka.js' - }, - 'da-normforms': { - name: 'Normal forms', - source: 'rules/da/da-normforms.js' - }, - 'eo-transliteration': { - name: 'Transliteration', - source: 'rules/eo/eo-transliteration.js' - }, - 'fo-normforms': { - name: 'Føroyskt', - source: 'rules/fo/fo-normforms.js' - }, - 'fi-transliteration': { - name: 'translitterointi', - source: 'rules/fi/fi-transliteration.js' - }, - 'hi-transliteration': { - name: 'लिप्यंतरण', - source: 'rules/hi/hi-transliteration.js' - }, - 'hi-inscript': { - name: 'इनस्क्रिप्ट', - source: 'rules/hi/hi-inscript.js' - }, - 'is-normforms': { - name: 'Normal forms', - source: 'rules/is/is-normforms.js' - }, - 'jv-transliteration': { - name: 'Transliteration', - source: 'rules/jv/jv-transliteration.js' - }, - 'mai-inscript': { - name: 'इनस्क्रिप्ट', - source: 'rules/mai/mai-inscript.js', - depends: 'hi-inscript' - }, - 'hi-bolnagri': { - name: 'बोलनागरी', - source: 'rules/hi/hi-bolnagri.js' - }, - 'ml-transliteration': { - name: 'ലിപ്യന്തരണം', - source: 'rules/ml/ml-transliteration.js' - }, - 'ml-inscript': { - name: 'ഇൻസ്ക്രിപ്റ്റ്', - source: 'rules/ml/ml-inscript.js' - }, - 'sv-normforms': { - name: 'Normal forms', - source: 'rules/sv/sv-normforms.js' - }, - 'ta-inscript': { - name: 'இன்ஸ்கிரிப்ட்', - source: 'rules/ta/ta-inscript.js' - }, - 'ta-transliteration': { - name: 'எழுத்துப்பெயர்ப்பு', - source: 'rules/ta/ta-transliteration.js' - }, - 'ta-99': { - name: 'தமிழ்99', - source: 'rules/ta/ta-99.js' - }, - 'ta-bamini': { - name: 'பாமினி', - source: 'rules/ta/ta-bamini.js' - }, - 'de': { - name: 'Deutsch', - source: 'rules/de/de.js' - }, - 'he-standard-2012': { - name: 'Hebrew 2012 (from English)', - source: 'rules/he/he-standard-2012.js' - }, - 'he-standard-2012-extonly': { - name: 'Hebrew 2012', - source: 'rules/he/he-standard-2012-extonly.js' - }, - 'gu-inscript': { - name: 'ઇનસ્ક્રિપ્ટ', - source: 'rules/gu/gu-inscript.js' - }, - 'gu-transliteration': { - name: 'લિપ્યાંતરણ', - source: 'rules/gu/gu-transliteration.js' - }, - 'ka-transliteration': { - name: 'ტრანსლიტერაცია', - source: 'rules/ka/ka-transliteration.js' - }, - 'kn-inscript': { - name: 'Inscript', - source: 'rules/kn/kn-inscript.js' - }, - 'kn-transliteration': { - name: 'Transliteration', - source: 'rules/kn/kn-transliteration.js' - }, - 'kn-kgp': { - name: 'KGP/Nudi/KP Rao', - source: 'rules/kn/kn-kgp.js' - }, - 'kok-inscript2': { - name: 'इनस्क्रिप्ट २', - source: 'rules/kok/kok-inscript2.js' - }, - 'mr-inscript': { - name: 'इनस्क्रिप्ट', - source: 'rules/mr/mr-inscript.js' - }, - 'mr-inscript2': { - name: 'इनस्क्रिप्ट २', - source: 'rules/mr/mr-inscript2.js' - }, - 'mr-transliteration': { - name: 'अक्षरांतरण', - source: 'rules/mr/mr-transliteration.js' - }, - 'ne-inscript': { - name: 'इनस्क्रिप्ट', - source: 'rules/ne/ne-inscript.js' - }, - 'ne-inscript2': { - name: 'इनस्क्रिप्ट २', - source: 'rules/ne/ne-inscript2.js' - }, - 'ne-transliteration': { - name: 'Transliteration', - source: 'rules/ne/ne-transliteration.js' - }, - 'no-normforms': { - name: 'Normal transliterasjon', - source: 'rules/no/no-normforms.js' - }, - 'no-tildeforms': { - name: 'Tildemerket transliterasjon', - source: 'rules/no/no-tildeforms.js' - }, - 'or-transliteration': { - name: 'Transliteration', - source: 'rules/or/or-transliteration.js' - }, - 'or-inscript': { - name: 'Inscript', - source: 'rules/or/or-inscript.js' - }, - 'or-lekhani': { - name: 'ଲେଖନୀ', - source: 'rules/or/or-lekhani.js' - }, - 'se-normforms': { - name: 'Normal forms', - source: 'rules/se/se-normforms.js' - }, - 'te-inscript': { - name: 'ఇన్‍స్క్రిప్ట్', - source: 'rules/te/te-inscript.js' - }, - 'te-transliteration': { - name: 'లిప్యంతరీకరణ', - source: 'rules/te/te-transliteration.js' - }, - 'pa-inscript': { - name: 'Inscript', - source: 'rules/pa/pa-inscript.js' - }, - 'pa-transliteration': { - name: 'Transliteration', - source: 'rules/pa/pa-transliteration.js' - }, - 'pa-phonetic': { - name: 'Phonetic', - source: 'rules/pa/pa-phonetic.js' - }, - 'ru-jcuken': { - name: 'ЙЦУКЕН', - source: 'rules/ru/ru-jcuken.js' - }, - 'sa-inscript': { - name: 'Inscript', - source: 'rules/sa/sa-inscript.js' - }, - 'sa-inscript2': { - name: 'इनस्क्रिप्ट २', - source: 'rules/sa/sa-inscript2.js' - }, - 'sa-transliteration': { - name: 'Transliteration', - source: 'rules/sa/sa-transliteration.js' - }, - 'sah-transliteration': { - name: 'Transliteration', - source: 'rules/sah/sah-transliteration.js' - }, - 'si-singlish': { - name: 'Singlish', - source: 'rules/si/si-singlish.js' - }, - 'si-wijesekara': { - name: 'Wijesekara', - source: 'rules/si/si-wijesekara.js' - }, - 'ur-transliteration': { - name: 'Transliteration', - source: 'rules/ur/ur-transliteration.js' - }, - 'mn-cyrl': { - name: 'Cyrillic', - source: 'rules/mn/mn-cyrl.js' - }, - 'ipa-sil': { - name: 'International Phonetic Alphabet - SIL', - source: 'rules/fonipa/ipa-sil.js' - } - } ); - - $.extend( $.ime.languages, { - 'ady': { - autonym: 'адыгэбзэ', - inputmethods: [ 'cyrl-palochka' ] - }, - 'ahr': { - autonym: 'अहिराणी', - inputmethods: [ 'mr-transliteration', 'mr-inscript' ] - }, - 'am': { - autonym: 'አማርኛ', - inputmethods: [ 'am-transliteration' ] - }, - 'as': { - autonym: 'অসমীয়া', - inputmethods: [ 'as-transliteration', 'as-avro', 'as-bornona', 'as-inscript' ] - }, - 'av': { - autonym: 'авар', - inputmethods: [ 'cyrl-palochka' ] - }, - 'be': { - autonym: 'беларуская', - inputmethods: [ 'be-transliteration', 'be-latin' ] - }, - 'be-tarask': { - autonym: 'беларуская (тарашкевіца)', - inputmethods: [ 'be-transliteration', 'be-latin' ] - }, - 'ber': { - autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', - inputmethods: [ 'ber-tfng' ] - }, - 'bn': { - autonym: 'বাংলা', - inputmethods: [ 'bn-avro', 'bn-inscript', 'bn-nkb', 'bn-probhat' ] - }, - 'brx': { - autonym: 'बोड़ो', - inputmethods: [ 'brx-inscript' ] - }, - 'ce': { - autonym: 'нохчийн', - inputmethods: [ 'cyrl-palochka' ] - }, - 'da': { - autonym: 'Dansk', - inputmethods: [ 'da-normforms' ] - }, - 'de': { - autonym: 'Deutsch', - inputmethods: [ 'de' ] - }, - 'en': { - autonym: 'English', - inputmethods: [ 'ipa-sil' ] - }, - 'eo': { - autonym: 'Esperanto', - inputmethods: [ 'eo-transliteration' ] - }, - 'fo': { - autonym: 'Føroyskt', - inputmethods: [ 'fo-normforms' ] - }, - 'fi': { - autonym: 'Suomi', - inputmethods: [ 'fi-transliteration' ] - }, - 'gom': { - autonym: 'कोंकणी', - inputmethods: [ 'hi-transliteration', 'hi-inscript' ] - }, - 'gu': { - autonym: 'ગુજરાતી', - inputmethods: [ 'gu-transliteration', 'gu-inscript' ] - }, - 'he': { - autonym: 'עברית', - inputmethods: [ 'he-standard-2012-extonly', 'he-standard-2012' ] - }, - 'hi': { - autonym: 'हिन्दी', - inputmethods: [ 'hi-transliteration', 'hi-inscript', 'hi-bolnagri' ] - }, - 'hne': { - autonym: 'छत्तीसगढ़ी', - inputmethods: [ 'hi-transliteration' ] - }, - 'is': { - autonym: 'Íslenska', - inputmethods: [ 'is-normforms' ] - }, - 'fonipa': { - autonym: 'International Phonetic Alphabet', - inputmethods: [ 'ipa-sil' ] - }, - 'jv': { - autonym: 'ꦧꦱꦗꦮ', - inputmethods: [ 'jv-transliteration' ] - }, - 'ka': { - autonym: 'ქართული ენა', - inputmethods: [ 'ka-transliteration' ] - }, - 'kbd': { - autonym: 'адыгэбзэ (къэбэрдеибзэ)', - inputmethods: [ 'cyrl-palochka' ] - }, - 'kn': { - autonym: 'ಕನ್ನಡ', - inputmethods: [ 'kn-transliteration', 'kn-inscript', 'kn-kgp' ] - }, - 'kok': { - autonym: 'कोंकणी', - inputmethods: [ 'kok-inscript2' ] - }, - 'lbe': { - autonym: 'лакку', - inputmethods: [ 'cyrl-palochka' ] - }, - 'lez': { - autonym: 'лезги', - inputmethods: [ 'cyrl-palochka' ] - }, - 'mai': { - autonym: 'मैथिली', - inputmethods: [ 'mai-inscript' ] - }, - 'ml': { - autonym: 'മലയാളം', - inputmethods: [ 'ml-transliteration', 'ml-inscript' ] - }, - 'mn': { - autonym: 'Монгол', - inputmethods: [ 'mn-cyrl' ] - }, - 'mr': { - autonym: 'मराठी', - inputmethods: [ 'mr-transliteration', 'mr-inscript2', 'mr-inscript' ] - }, - 'ne': { - autonym: 'नेपाली', - inputmethods: [ 'ne-transliteration', 'ne-inscript2', 'ne-inscript' ] - }, - 'new': { - autonym: 'नेपाल भाषा', - inputmethods: [ 'hi-transliteration', 'hi-inscript' ] - }, - 'no': { - autonym: 'Norsk', - inputmethods: [ 'no-normforms', 'no-tildeforms' ] - }, - 'nb': { - autonym: 'Norsk (bokmål)', - inputmethods: [ 'no-normforms', 'no-tildeforms' ] - }, - 'nn': { - autonym: 'Norsk (nynorsk)', - inputmethods: [ 'no-normforms', 'no-tildeforms' ] - }, - 'or': { - autonym: 'ଓଡ଼ିଆ', - inputmethods: [ 'or-transliteration', 'or-lekhani', 'or-inscript' ] - }, - 'pa': { - autonym: 'ਪੰਜਾਬੀ', - inputmethods: [ 'pa-transliteration', 'pa-inscript', 'pa-phonetic' ] - }, - 'rif': { - autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', - inputmethods: [ 'ber-tfng' ] - }, - 'ru': { - autonym: 'русский', - inputmethods: [ 'ru-jcuken' ] - }, - 'sah': { - autonym: 'саха тыла', - inputmethods: [ 'sah-transliteration' ] - }, - 'sa': { - autonym: 'संस्कृत', - inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript' ] - }, - 'se': { - autonym: 'Davvisámegiella', - inputmethods: [ 'se-normforms' ] - }, - 'shi': { - autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', - inputmethods: [ 'ber-tfng' ] - }, - 'si': { - autonym: 'සිංහල', - inputmethods: [ 'si-singlish', 'si-wijesekara' ] - }, - 'sv': { - autonym: 'Svenska', - inputmethods: [ 'sv-normforms' ] - }, - 'ta': { - autonym: 'தமிழ்', - inputmethods: [ 'ta-transliteration', 'ta-99', 'ta-inscript', 'ta-bamini' ] - }, - 'tcy': { - autonym: 'ತುಳು', - inputmethods: [ 'kn-transliteration' ] - }, - 'te': { - autonym: 'తెలుగు', - inputmethods: [ 'te-transliteration', 'te-inscript' ] - }, - 'tkr': { - autonym: 'цӀаӀхна миз', - inputmethods: [ 'cyrl-palochka' ] - }, - 'ur': { - autonym: 'اردو', - inputmethods: [ 'ur-transliteration' ] - } - } ); - }( jQuery ) ); ( function ( $ ) { @@ -1102,7 +638,7 @@ if ( this.inputmethod !== null ) { this.selectIM( this.inputmethod.id ); } else { - this.selectLanguage ( $.ime.preferences.getLanguage() ); + this.selectLanguage( $.ime.preferences.getLanguage() ); } } @@ -1120,11 +656,35 @@ */ position: function () { this.focus(); // shows the trigger in case it is hidden - var position = this.$element.offset(); + var imeSelector = this, + position, top, left, room; - this.$imeSetting.css( 'top', position.top + this.$element.outerHeight() ); - this.$imeSetting.css( 'left', position.left + this.$element.outerWidth() - - this.$imeSetting.outerWidth() ); + position = this.$element.offset(); + top = position.top + this.$element.outerHeight(); + left = position.left + this.$element.outerWidth() + - this.$imeSetting.outerWidth(); + room = $( window ).height() - top; + if ( room < this.$imeSetting.outerHeight() ) { + top = top - this.$imeSetting.outerHeight(); + + this.$menu.css( 'top', + - ( this.$menu.outerHeight() + + this.$imeSetting.outerHeight() + ) ) + .addClass( 'position-top' ); + } + + this.$element.parents().each( function() { + if ( $( this ).css( 'position' ) === 'fixed' ) { + imeSelector.$imeSetting.css( 'position', 'fixed' ); + return false; + } + } ); + + this.$imeSetting.css({ + top: top, + left: left + }); }, /** @@ -1198,7 +758,6 @@ // save this preference $.ime.preferences.save(); } ); - }, /** @@ -1492,3 +1051,523 @@ } } ); }( jQuery ) ); + +( function ( $ ) { + 'use strict'; + + $.extend( $.ime.sources, { + 'am-transliteration': { + name: 'Transliteration', + source: 'rules/am/am-transliteration.js' + }, + 'as-avro': { + name: 'অভ্ৰ', + source: 'rules/as/as-avro.js' + }, + 'as-bornona': { + name: 'বৰ্ণনা', + source: 'rules/as/as-bornona.js' + }, + 'as-inscript': { + name: 'ইন্‌স্ক্ৰিপ্ত', + source: 'rules/as/as-inscript.js' + }, + 'as-transliteration': { + name: 'প্ৰতিৰূপান্তৰণ', + source: 'rules/as/as-transliteration.js' + }, + 'be-latin': { + name: 'Łacinka', + source: 'rules/be/be-latin.js' + }, + 'be-transliteration': { + name: 'Transliteration', + source: 'rules/be/be-transliteration.js' + }, + 'ber-tfng': { + name: 'Tifinagh', + source: 'rules/ber/ber-tfng.js' + }, + 'bn-avro': { + name: 'Avro', + source: 'rules/bn/bn-avro.js' + }, + 'bn-inscript': { + name: 'ইন্‌স্ক্ৰিপ্ত', + source: 'rules/bn/bn-inscript.js' + }, + 'bn-nkb': { + name: 'National Keyboard', + source: 'rules/bn/bn-nkb.js' + }, + 'bn-probhat': { + name: 'Probhat', + source: 'rules/bn/bn-probhat.js' + }, + 'brx-inscript': { + name: 'Inscript', + source: 'rules/brx/brx-inscript.js' + }, + 'cyrl-palochka': { + name: 'Palochka', + source: 'rules/cyrl/cyrl-palochka.js' + }, + 'da-normforms': { + name: 'Normal forms', + source: 'rules/da/da-normforms.js' + }, + 'eo-transliteration': { + name: 'Transliteration', + source: 'rules/eo/eo-transliteration.js' + }, + 'fo-normforms': { + name: 'Føroyskt', + source: 'rules/fo/fo-normforms.js' + }, + 'fi-transliteration': { + name: 'translitterointi', + source: 'rules/fi/fi-transliteration.js' + }, + 'hi-transliteration': { + name: 'लिप्यंतरण', + source: 'rules/hi/hi-transliteration.js' + }, + 'hi-inscript': { + name: 'इनस्क्रिप्ट', + source: 'rules/hi/hi-inscript.js' + }, + 'is-normforms': { + name: 'Normal forms', + source: 'rules/is/is-normforms.js' + }, + 'jv-transliteration': { + name: 'Transliteration', + source: 'rules/jv/jv-transliteration.js' + }, + 'mai-inscript': { + name: 'इनस्क्रिप्ट', + source: 'rules/mai/mai-inscript.js', + depends: 'hi-inscript' + }, + 'hi-bolnagri': { + name: 'बोलनागरी', + source: 'rules/hi/hi-bolnagri.js' + }, + 'ml-transliteration': { + name: 'ലിപ്യന്തരണം', + source: 'rules/ml/ml-transliteration.js' + }, + 'ml-inscript': { + name: 'ഇൻസ്ക്രിപ്റ്റ്', + source: 'rules/ml/ml-inscript.js' + }, + 'sv-normforms': { + name: 'Normal forms', + source: 'rules/sv/sv-normforms.js' + }, + 'ta-inscript': { + name: 'இன்ஸ்கிரிப்ட்', + source: 'rules/ta/ta-inscript.js' + }, + 'ta-transliteration': { + name: 'எழுத்துப்பெயர்ப்பு', + source: 'rules/ta/ta-transliteration.js' + }, + 'ta-99': { + name: 'தமிழ்99', + source: 'rules/ta/ta-99.js' + }, + 'ta-bamini': { + name: 'பாமினி', + source: 'rules/ta/ta-bamini.js' + }, + 'de': { + name: 'Deutsch', + source: 'rules/de/de.js' + }, + 'he-standard-2012': { + name: 'Hebrew 2012 (from English)', + source: 'rules/he/he-standard-2012.js' + }, + 'he-standard-2012-extonly': { + name: 'Hebrew 2012', + source: 'rules/he/he-standard-2012-extonly.js' + }, + 'gu-inscript': { + name: 'ઇનસ્ક્રિપ્ટ', + source: 'rules/gu/gu-inscript.js' + }, + 'gu-inscript2': { + name: 'ઇનસ્ક્રિપ્ટ ૨', + source: 'rules/gu/gu-inscript2.js' + }, + 'gu-phonetic': { + name: 'ફોનેતિક', + source: 'rules/gu/gu-phonetic.js' + }, + 'gu-transliteration': { + name: 'લિપ્યાંતરણ', + source: 'rules/gu/gu-transliteration.js' + }, + 'ka-transliteration': { + name: 'ტრანსლიტერაცია', + source: 'rules/ka/ka-transliteration.js' + }, + 'kn-inscript': { + name: 'Inscript', + source: 'rules/kn/kn-inscript.js' + }, + 'kn-transliteration': { + name: 'Transliteration', + source: 'rules/kn/kn-transliteration.js' + }, + 'kn-kgp': { + name: 'KGP/Nudi/KP Rao', + source: 'rules/kn/kn-kgp.js' + }, + 'kok-inscript2': { + name: 'इनस्क्रिप्ट २', + source: 'rules/kok/kok-inscript2.js' + }, + 'mr-inscript': { + name: 'इनस्क्रिप्ट', + source: 'rules/mr/mr-inscript.js' + }, + 'mr-inscript2': { + name: 'इनस्क्रिप्ट २', + source: 'rules/mr/mr-inscript2.js' + }, + 'mr-transliteration': { + name: 'अक्षरांतरण', + source: 'rules/mr/mr-transliteration.js' + }, + 'ne-inscript': { + name: 'इनस्क्रिप्ट', + source: 'rules/ne/ne-inscript.js' + }, + 'ne-inscript2': { + name: 'इनस्क्रिप्ट २', + source: 'rules/ne/ne-inscript2.js' + }, + 'ne-transliteration': { + name: 'Transliteration', + source: 'rules/ne/ne-transliteration.js' + }, + 'no-normforms': { + name: 'Normal transliterasjon', + source: 'rules/no/no-normforms.js' + }, + 'no-tildeforms': { + name: 'Tildemerket transliterasjon', + source: 'rules/no/no-tildeforms.js' + }, + 'or-transliteration': { + name: 'Transliteration', + source: 'rules/or/or-transliteration.js' + }, + 'or-inscript': { + name: 'Inscript', + source: 'rules/or/or-inscript.js' + }, + 'or-lekhani': { + name: 'ଲେଖନୀ', + source: 'rules/or/or-lekhani.js' + }, + 'se-normforms': { + name: 'Normal forms', + source: 'rules/se/se-normforms.js' + }, + 'te-inscript': { + name: 'ఇన్‍స్క్రిప్ట్', + source: 'rules/te/te-inscript.js' + }, + 'te-transliteration': { + name: 'లిప్యంతరీకరణ', + source: 'rules/te/te-transliteration.js' + }, + 'pa-inscript': { + name: 'Inscript', + source: 'rules/pa/pa-inscript.js' + }, + 'pa-inscript2': { + name: 'Inscript2', + source: 'rules/pa/pa-inscript2.js' + }, + 'pa-jhelum': { + name: 'Jhelum', + source: 'rules/pa/pa-jhelum.js' + }, + 'pa-transliteration': { + name: 'Transliteration', + source: 'rules/pa/pa-transliteration.js' + }, + 'pa-phonetic': { + name: 'Phonetic', + source: 'rules/pa/pa-phonetic.js' + }, + 'ru-jcuken': { + name: 'ЙЦУКЕН', + source: 'rules/ru/ru-jcuken.js' + }, + 'sa-inscript': { + name: 'Inscript', + source: 'rules/sa/sa-inscript.js' + }, + 'sa-inscript2': { + name: 'इनस्क्रिप्ट २', + source: 'rules/sa/sa-inscript2.js' + }, + 'sa-transliteration': { + name: 'Transliteration', + source: 'rules/sa/sa-transliteration.js' + }, + 'sah-transliteration': { + name: 'Transliteration', + source: 'rules/sah/sah-transliteration.js' + }, + 'si-singlish': { + name: 'Singlish', + source: 'rules/si/si-singlish.js' + }, + 'si-wijesekara': { + name: 'Wijesekara', + source: 'rules/si/si-wijesekara.js' + }, + 'ur-transliteration': { + name: 'Transliteration', + source: 'rules/ur/ur-transliteration.js' + }, + 'mn-cyrl': { + name: 'Cyrillic', + source: 'rules/mn/mn-cyrl.js' + }, + 'ipa-sil': { + name: 'International Phonetic Alphabet - SIL', + source: 'rules/fonipa/ipa-sil.js' + } + } ); + + $.extend( $.ime.languages, { + 'ady': { + autonym: 'адыгэбзэ', + inputmethods: [ 'cyrl-palochka' ] + }, + 'ahr': { + autonym: 'अहिराणी', + inputmethods: [ 'mr-transliteration', 'mr-inscript' ] + }, + 'am': { + autonym: 'አማርኛ', + inputmethods: [ 'am-transliteration' ] + }, + 'as': { + autonym: 'অসমীয়া', + inputmethods: [ 'as-transliteration', 'as-avro', 'as-bornona', 'as-inscript' ] + }, + 'av': { + autonym: 'авар', + inputmethods: [ 'cyrl-palochka' ] + }, + 'be': { + autonym: 'беларуская', + inputmethods: [ 'be-transliteration', 'be-latin' ] + }, + 'be-tarask': { + autonym: 'беларуская (тарашкевіца)', + inputmethods: [ 'be-transliteration', 'be-latin' ] + }, + 'ber': { + autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', + inputmethods: [ 'ber-tfng' ] + }, + 'bn': { + autonym: 'বাংলা', + inputmethods: [ 'bn-avro', 'bn-inscript', 'bn-nkb', 'bn-probhat' ] + }, + 'brx': { + autonym: 'बोड़ो', + inputmethods: [ 'brx-inscript' ] + }, + 'ce': { + autonym: 'нохчийн', + inputmethods: [ 'cyrl-palochka' ] + }, + 'da': { + autonym: 'Dansk', + inputmethods: [ 'da-normforms' ] + }, + 'de': { + autonym: 'Deutsch', + inputmethods: [ 'de' ] + }, + 'en': { + autonym: 'English', + inputmethods: [ 'ipa-sil' ] + }, + 'eo': { + autonym: 'Esperanto', + inputmethods: [ 'eo-transliteration' ] + }, + 'fo': { + autonym: 'Føroyskt', + inputmethods: [ 'fo-normforms' ] + }, + 'fi': { + autonym: 'Suomi', + inputmethods: [ 'fi-transliteration' ] + }, + 'gom': { + autonym: 'कोंकणी', + inputmethods: [ 'hi-transliteration', 'hi-inscript' ] + }, + 'gu': { + autonym: 'ગુજરાતી', + inputmethods: [ 'gu-transliteration', 'gu-inscript', 'gu-inscript2', 'gu-phonetic' ] + }, + 'he': { + autonym: 'עברית', + inputmethods: [ 'he-standard-2012-extonly', 'he-standard-2012' ] + }, + 'hi': { + autonym: 'हिन्दी', + inputmethods: [ 'hi-transliteration', 'hi-inscript', 'hi-bolnagri' ] + }, + 'hne': { + autonym: 'छत्तीसगढ़ी', + inputmethods: [ 'hi-transliteration' ] + }, + 'is': { + autonym: 'Íslenska', + inputmethods: [ 'is-normforms' ] + }, + 'fonipa': { + autonym: 'International Phonetic Alphabet', + inputmethods: [ 'ipa-sil' ] + }, + 'jv': { + autonym: 'ꦧꦱꦗꦮ', + inputmethods: [ 'jv-transliteration' ] + }, + 'ka': { + autonym: 'ქართული ენა', + inputmethods: [ 'ka-transliteration' ] + }, + 'kbd': { + autonym: 'адыгэбзэ (къэбэрдеибзэ)', + inputmethods: [ 'cyrl-palochka' ] + }, + 'kn': { + autonym: 'ಕನ್ನಡ', + inputmethods: [ 'kn-transliteration', 'kn-inscript', 'kn-kgp' ] + }, + 'kok': { + autonym: 'कोंकणी', + inputmethods: [ 'kok-inscript2' ] + }, + 'lbe': { + autonym: 'лакку', + inputmethods: [ 'cyrl-palochka' ] + }, + 'lez': { + autonym: 'лезги', + inputmethods: [ 'cyrl-palochka' ] + }, + 'mai': { + autonym: 'मैथिली', + inputmethods: [ 'mai-inscript' ] + }, + 'ml': { + autonym: 'മലയാളം', + inputmethods: [ 'ml-transliteration', 'ml-inscript' ] + }, + 'mn': { + autonym: 'Монгол', + inputmethods: [ 'mn-cyrl' ] + }, + 'mr': { + autonym: 'मराठी', + inputmethods: [ 'mr-transliteration', 'mr-inscript2', 'mr-inscript' ] + }, + 'ne': { + autonym: 'नेपाली', + inputmethods: [ 'ne-transliteration', 'ne-inscript2', 'ne-inscript' ] + }, + 'new': { + autonym: 'नेपाल भाषा', + inputmethods: [ 'hi-transliteration', 'hi-inscript' ] + }, + 'no': { + autonym: 'Norsk', + inputmethods: [ 'no-normforms', 'no-tildeforms' ] + }, + 'nb': { + autonym: 'Norsk (bokmål)', + inputmethods: [ 'no-normforms', 'no-tildeforms' ] + }, + 'nn': { + autonym: 'Norsk (nynorsk)', + inputmethods: [ 'no-normforms', 'no-tildeforms' ] + }, + 'or': { + autonym: 'ଓଡ଼ିଆ', + inputmethods: [ 'or-transliteration', 'or-lekhani', 'or-inscript' ] + }, + 'pa': { + autonym: 'ਪੰਜਾਬੀ', + inputmethods: [ 'pa-transliteration', 'pa-inscript', 'pa-phonetic', 'pa-inscript2', 'pa-jhelum' ] + }, + 'rif': { + autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', + inputmethods: [ 'ber-tfng' ] + }, + 'ru': { + autonym: 'русский', + inputmethods: [ 'ru-jcuken' ] + }, + 'sah': { + autonym: 'саха тыла', + inputmethods: [ 'sah-transliteration' ] + }, + 'sa': { + autonym: 'संस्कृत', + inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript' ] + }, + 'se': { + autonym: 'Davvisámegiella', + inputmethods: [ 'se-normforms' ] + }, + 'shi': { + autonym: 'ⵜⵉⴼⵉⵏⴰⵖ', + inputmethods: [ 'ber-tfng' ] + }, + 'si': { + autonym: 'සිංහල', + inputmethods: [ 'si-singlish', 'si-wijesekara' ] + }, + 'sv': { + autonym: 'Svenska', + inputmethods: [ 'sv-normforms' ] + }, + 'ta': { + autonym: 'தமிழ்', + inputmethods: [ 'ta-transliteration', 'ta-99', 'ta-inscript', 'ta-bamini' ] + }, + 'tcy': { + autonym: 'ತುಳು', + inputmethods: [ 'kn-transliteration' ] + }, + 'te': { + autonym: 'తెలుగు', + inputmethods: [ 'te-transliteration', 'te-inscript' ] + }, + 'tkr': { + autonym: 'цӀаӀхна миз', + inputmethods: [ 'cyrl-palochka' ] + }, + 'ur': { + autonym: 'اردو', + inputmethods: [ 'ur-transliteration' ] + } + } ); + +}( jQuery ) ); diff --git a/lib/jquery.ime/rules/be/be-transliteration.js b/lib/jquery.ime/rules/be/be-transliteration.js index d9267406..6fc66731 100644 --- a/lib/jquery.ime/rules/be/be-transliteration.js +++ b/lib/jquery.ime/rules/be/be-transliteration.js @@ -22,8 +22,8 @@ ['I', 'Ш'], ['O', 'Ў'], ['P', 'З'], - ['{', 'Х'], - ['}', '\''], + ['\\{', 'Х'], + ['\\}', '\''], ['A', 'Ф'], ['S', 'Ы'], ['D', 'В'], diff --git a/lib/jquery.ime/rules/fonipa/ipa-sil.js b/lib/jquery.ime/rules/fonipa/ipa-sil.js index cf54ac09..7f479a63 100644 --- a/lib/jquery.ime/rules/fonipa/ipa-sil.js +++ b/lib/jquery.ime/rules/fonipa/ipa-sil.js @@ -202,11 +202,11 @@ ['@', '\u030a'], // Combining ring above - ['(?:\u033c){', '\u0323'], // {{{{{ // Combining dot below - ['(?:\u033b){', '\u033c'], // {{{{ // Combining seagull below - ['(?:\u033a){', '\u033b'], // {{{ // Combining square below - ['(?:\u032a){', '\u033a'], // {{ // Combining inverted bridge below - ['{', '\u032a'], // { // Combining bridge below + ['(?:\u033c)\\{', '\u0323'], // {{{{{ // Combining dot below + ['(?:\u033b)\\{', '\u033c'], // {{{{ // Combining seagull below + ['(?:\u033a)\\{', '\u033b'], // {{{ // Combining square below + ['(?:\u032a)\\{', '\u033a'], // {{ // Combining inverted bridge below + ['\\{', '\u032a'], // { // Combining bridge below ['(?:\u0303)~', '\u0334'], // ~~ // Combining tilde overlay ['~', '\u0303'], // ~ // Combining tilde diff --git a/lib/jquery.ime/rules/gu/gu-inscript2.js b/lib/jquery.ime/rules/gu/gu-inscript2.js new file mode 100644 index 00000000..7a2365c7 --- /dev/null +++ b/lib/jquery.ime/rules/gu/gu-inscript2.js @@ -0,0 +1,117 @@ +( function ( $ ) { + 'use strict'; + + var guInScript2 = { + id: 'gu-inscript2', + name: 'ઇનસ્ક્રિપ્ટ ૨', + description: 'Enhanced InScript keyboard for Gujarati script', + date: '2013-11-15', + author: 'Parag Nemade', + license: 'GPLv3', + 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", "ર"], + ["K", "ખ"], + ["k", "ક"], + ["L", "થ"], + ["l", "ત"], + [":", "છ"], + [";", "ચ"], + ["\"", "ઠ"], + ["\\'", "ટ"], + ["\\|", "ઑ"], + ["\\", "ૉ"], + ["X", "ઁ"], + ["x", "ં"], + ["C", "ણ"], + ["c", "મ"], + ["v", "ન"], + ["b", "વ"], + ["N", "ળ"], + ["n", "લ"], + ["M", "શ"], + ["m", "સ"], + ["\\<", "ષ"], + [",", ","], + ["\\>", "।"], + ["\\.", "."], + ["/", "ય"], + ["\\%", "જ્ઞ"], + ["\\^", "ત્ર"], + ["\\&", "ક્ષ"], + ["\\*", "શ્ર"] + ], + patterns_x: [ + ["1", "‍"], + ["2", "‌"], + ["4", "₹"], + ["\\+", "ૠ"], + ["\\=", "ૄ"], + ["R", "ૡ"], + ["r", "ૣ"], + ["F", "ઌ"], + ["f", "ૢ"], + ["X", "ૐ"], + [",", "૱"], + ["\\>", "૥"], + ["\\.", "ઽ"]] + }; + $.ime.register( guInScript2 ); + +}( jQuery ) ); diff --git a/lib/jquery.ime/rules/gu/gu-phonetic.js b/lib/jquery.ime/rules/gu/gu-phonetic.js new file mode 100644 index 00000000..f34a0f14 --- /dev/null +++ b/lib/jquery.ime/rules/gu/gu-phonetic.js @@ -0,0 +1,110 @@ +( function ( $ ) { + 'use strict'; + + var guPhonetic = { + id: 'gu-phonetic', + name: 'ફોનેતિક', + description: 'Phonetic keyboard for Gujarati script', + date: '2013-11-15', + author: 'Parag Nemade', + license: 'GPLv3', + 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", "ષ"], + ["C", "છ"], + ["c", "ચ"], + ["V", "ઽ"], + ["v", "વ"], + ["B", "ભ"], + ["b", "બ"], + ["N", "ણ"], + ["n", "ન"], + ["M", "ં"], + ["m", "મ"], + ["\\<", "ૐ"], + [",", ","], + ["\\>", "઼"], + ["\\.", "."], + ["\\?", "ઐ"], + ["/", "એ"], + ["X", "ક્ષ"], + ["\\%", "જ્ઞ"], + ["\\^", "ત્ર"], + ["\\*", "શ્ર"]] + }; + $.ime.register( guPhonetic ); + +}( jQuery ) ); diff --git a/lib/jquery.ime/rules/or/or-lekhani.js b/lib/jquery.ime/rules/or/or-lekhani.js index d7a46de1..cb4da458 100644 --- a/lib/jquery.ime/rules/or/or-lekhani.js +++ b/lib/jquery.ime/rules/or/or-lekhani.js @@ -3,8 +3,8 @@ var orLekhani = { id: 'or-lekhani', - name: 'ଲେଖନୀ', - description: 'Odiya Lekhani phonetic input method', + name: 'Odia Lekhani', + description: 'Odia Lekhani phonetic input method', date: '2012-10-14', URL: 'http://github.com/wikimedia/jquery.ime', author: 'Junaid P V and Subhashish Panigrahi', @@ -15,23 +15,27 @@ patterns: [ ['\\\\([A-Za-z\\>_~\\.0-9])', '\\\\','$1'], - ['([କ-ହୟୱ])a', '$1ା'], - ['([କ-ହୟୱ])i', '$1\u0b3f'], - ['([କ-ହୟୱ])I', '$1ୀ'], - ['([କ-ହୟୱ])u', '$1\u0b41'], + ['([(କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍ଜ])a', '$1ା'], + ['([କ-ଳଲନ୍ଧଥଡ଼ଢ଼ହୟୱରକ୍ଷଶସଷଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍ଜ])i', '$1\u0b3f'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])I', '$1ୀ'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])u', '$1\u0b41'], ['([କ-ହୟୱ])(U|\u0b41u)', '$1\u0b42'], ['([କ-ହୟୱ])R', '$1\u0b43'], ['([କ-ହୟୱ])\u0b43R', '$1\u0b44'], ['([କ-ହୟୱ])୍ଳ୍l', '$1ୢ'], ['([କ-ହୟୱ])ୢl', '$1ୣ'], - ['([କ-ହୟୱ])e', '$1େ'], - ['([କ-ହୟୱ])ାi', '$1ୈ'], - ['([କ-ହୟୱ])o', '$1ୋ'], - ['([କ-ହୟୱ])(ାu|ୋu)', '$1ୌ'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])e', '$1େ'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])ାi', '$1ୈ'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])o', '$1ୋ'], + ['([କ-ହୟୱଡ଼ଢ଼ଙ୍କଙ୍ଖଙ୍ଗଙ୍ଘଞ୍ଚଞ୍ଛଞ୍ଝଣ୍ଟଣ୍ଠଣ୍ଡଣ୍ଢନ୍ତନ୍ଥନ୍ଦନ୍ଧମ୍ପମ୍ଫମ୍ବମ୍ଭଞ୍])(ାu|ୋu)', '$1ୌ'], ['([କ-ହୟୱ])E', '$1\u0B48'], + ['([କ-ହୟୱ])(w|v)', '$1୍ୱ'], + ['([କ-ହୟୱ])~', '$1\u200C'], ['([କ-ହୟୱ])y', '$1୍ୟ'], // y - + + ['z', '୍'], // halanta + ['\\.', '।'], //purnacheda ['ଅa', 'ଆ'], ['(ଅi|ଏe)', 'ଐ'], ['(ଅu|ଓo|ଓO)', 'ଔ'], @@ -42,9 +46,11 @@ ['ଞ୍ଜh', 'ଞ୍ଝ'], // njh ['ଙ୍କh', 'ଙ୍ଖ'], // nkh ['ଙ୍ଗh', 'ଙ୍ଘ'], // ngh + ['ହm', 'ହ୍ମ'], // mh + ['(ହn|ନh)', 'ହ୍ନ'], // nh ['ମ୍ବh', 'ମ୍ଭ'], // mbh or nbh + ['ଣ୍ଡai', 'ଣ୍ଡାଇ'], // NDai ['ଜ୍ଜh', 'ଜ୍ଝ'], // jjh - ['ଚ୍ଚh', 'ଚ୍ଛ'], // cch ['ଣG', 'ଙ'], // NG @@ -54,26 +60,42 @@ ['ନc', 'ଞ୍ଚ'], // nc ['ନg', 'ଙ୍ଗ'], // ng ['ଚh', 'ଛ'], // ch + ['C', 'ଛ'], // ch ['ଜh', 'ଝ'], // jh ['ନj', 'ଞ୍ଜ'], // nj ['ନk', 'ଙ୍କ'], // nk - ['ଟh', 'ଠ'], // Th + ['ନd', 'ନ୍ଦ'], // nd + ['ନD|ଣD', 'ଣ୍ଡ'], // nd + ['(ନDh|ଣDH|ଣDh)', 'ଣ୍ଢ'], //ndh + ['ନdh', 'ନ୍ଧ'], // ndh + ['([କସପନ])t', '$1୍ତ'], // kt, st, pt, nt + ['([ଷ])T', '$1୍ଟ'], // ST + ['(ଟh|ଟH)', 'ଠ'], // Th ['ଡh', 'ଢ'], // Dh ['ତh', 'ଥ'], // th ['ଦh', 'ଧ'], // dh - ['(f|ପh)', 'ଫ'], // ph or f + ['(f|ପh|P)', 'ଫ'], // ph or f ['ବh', 'ଭ'], // bh ['ସh', 'ଷ'], // sh ['(ମb|ନb)', 'ମ୍ବ'], // mb or nb + ['(ଣT|ନT)', 'ଣ୍ଟ'], // NT + ['(ଣTh|ଣTh|ନTh|ନTH)', 'ଣ୍ଠ'], // NTh + ['([ସ|ଷ|ମ])p', '$1୍ପ'], // sp/shp + ['shp', 'ଷ୍ପ'], // sp ['ଂM', 'ଁ'], // MM ['କk', 'କ୍କ'], // kk ['ଗg', 'ଗ୍ଗ'], // gg ['ଚc', 'ଚ୍ଚ'], // cc ['ଜj', 'ଜ୍ଜ'], // jj + ['ଦd', 'ଦ୍ଦ'], // dd ['ଟT', 'ଟ୍ଟ'], // TT ['ଡD', 'ଡ୍ଡ'], // DD ['ତt', 'ତ୍ତ'], // tt + ['ଲl', 'ଲ୍ଲ'], // ll + ['ପp', 'ପ୍ପ'], //pp + [ '\\[', '\u200c' ], + [ '_', '\u200c' ], ['ଆ\\\\', '\u0B3E'], // aa sign @@ -96,6 +118,7 @@ ['d', 'ଦ'], ['\u200c?e', 'ଏ'], ['g', 'ଗ'], + ['G', 'ଘ'], ['h', 'ହ'], ['\u200c?i', 'ଇ'], ['j', 'ଜ'], @@ -112,8 +135,8 @@ ['\u200c?u', 'ଉ'], ['[vwVW]', 'ୱ'], ['x', 'କ୍ଷ'], - ['[yY]', 'ୟ'], - ['z', '\u0B3C'], + ['[Y]', 'ୟ'], + ['[y]', 'ଯ'], ['\u200c?A', 'ଆ'], ['B', 'ବ'], ['C', 'ଛ'], @@ -124,12 +147,12 @@ ['H', 'ଃ'], ['\u200c?I', 'ଈ'], ['J', 'ଯ'], - ['K', 'କ୍କ'], + ['K', 'ଖ'], ['L', 'ଳ'], ['M', 'ଂ'], ['N', 'ଣ'], ['\u200c?O', 'ଔ'], - ['P', 'ପ୍ପ'], + ['P', 'ଫ'], ['Q', 'ଢ଼'], ['R', 'ଋ'], ['S', 'ଶ'], @@ -137,9 +160,8 @@ ['\u200c?U', 'ଊ'], ['X', 'ଁ'], ['Z', 'ଜ୍ଞ'], - ['\\~', '୍'], - ['//', 'ଽ'], - ['_', '\u200c'], + ['//', '୍ର'], + ['0', '୦'], ['1', '୧'], ['2', '୨'], @@ -153,4 +175,4 @@ }; $.ime.register( orLekhani ); -}( jQuery ) ); +}( jQuery ) ); \ No newline at end of file diff --git a/lib/jquery.ime/rules/pa/pa-inscript2.js b/lib/jquery.ime/rules/pa/pa-inscript2.js new file mode 100644 index 00000000..cf4c711b --- /dev/null +++ b/lib/jquery.ime/rules/pa/pa-inscript2.js @@ -0,0 +1,110 @@ +( function ( $ ) { + 'use strict'; + + var paInScript2 = { + id: 'pa-inscript2', + name: 'Punjabi InScript2', + description: 'Enhanced InScript keyboard for Punjabi script', + date: '2013-11-14', + author: 'Parag Nemade', + license: 'GPLv3', + 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", "ਤ"], + [":", "ਛ"], + [";", "ਚ"], + ["\"", "ਠ"], + ["\\'", "ਟ"], + ["X", "ਂ"], + ["x", "ੰ"], + ["C", "ਣ"], + ["c", "ਮ"], + ["v", "ਨ"], + ["B", "ਞ"], + ["b", "ਵ"], + ["N", "N"], + ["n", "ਲ"], + ["M", "ਸ਼"], + ["m", "ਸ"], + [",", ","], + ["\\>", "।"], + ["\\.", "."], + ["/", "ਯ"] + ], + patterns_x: [ + ["1", "‍"], + ["2", "‌"], + ["4", "₹"], + ["i", "ਗ਼"], + ["p", "ਜ਼"], + ["\\[", "ੜ"], + ["D", "☬"], + ["d", "ੑ"], + ["F", "ੲ"], + ["G", "ੳ"], + ["H", "ਫ਼"], + ["K", "ਖ਼"], + ["X", "ੴ"], + ["x", "ਁ"], + ["N", "ਲ਼"], + ["\\.", "॥"], + ["/", "ੵ"]] + }; + $.ime.register( paInScript2 ); + +}( jQuery ) ); diff --git a/lib/jquery.ime/rules/pa/pa-jhelum.js b/lib/jquery.ime/rules/pa/pa-jhelum.js new file mode 100644 index 00000000..8c2b1580 --- /dev/null +++ b/lib/jquery.ime/rules/pa/pa-jhelum.js @@ -0,0 +1,130 @@ +( function ( $ ) { + 'use strict'; + + var paJhelum = { + id: 'pa-jhelum', + name: 'Punjabi Jhelum', + description: 'Jhelum keyboard for Punjabi script', + date: '2013-11-14', + author: 'Parag Nemade', + license: 'GPLv3', + 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", "ਐ"], + ["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", "ਮ"], + ["\\<", "<"], + [",", ","], + ["\\>", ">"], + ["\\.", "."], + ["\\?", "?"], + ["/", "/"], + ["\\*", "*"] + ], + patterns_x: [ + ["1", "੧"], + ["2", "੨"], + ["3", "੩"], + ["4", "੪"], + ["5", "੫"], + ["6", "੬"], + ["7", "੭"], + ["8", "੮"], + ["9", "੯"], + ["0", "੦"], + ["y", "੍ਰ"], + ["i", "ਗ਼"], + ["P", "ਫ਼"], + ["h", "੍ਹ"], + ["j", "ਜ਼"], + ["K", "ਖ਼"], + ["l", "ਲ਼"], + [";", "ਸ਼"]] + }; + $.ime.register( paJhelum ); + +}( jQuery ) ); diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index 037085af..5f1d6902 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -80,6 +80,7 @@ * Apply a font for the element. * * @param fontFamily String: font family name + * @param $element */ apply: function( fontFamily, $element ) { var fontStack = this.options.fontStack.slice( 0 ); @@ -115,7 +116,7 @@ if ( $.inArray( fontFamily, this.fonts ) >= 0 ) { return true; } - var styleString = this.getCSS( fontFamily ); + var styleString = this.getCSS( fontFamily, 'normal' ); if ( styleString ) { injectCSS( styleString ); } else { @@ -335,7 +336,7 @@ /** * Create a new style tag and add it to the DOM. * - * @param text String: CSS text + * @param css String: CSS text * @return HTMLStyleElement */ function injectCSS( css ) {