Merge "Update jquery.ime to 7572e2"

This commit is contained in:
jenkins-bot
2016-04-12 06:43:19 +00:00
committed by Gerrit Code Review
134 changed files with 11484 additions and 11473 deletions

View File

@@ -1,4 +1,4 @@
/*! jquery.ime - v0.1.0+20160325
/*! jquery.ime - v0.1.0+20160412
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2016 Santhosh Thottingal; Licensed GPL, MIT */
( function ( $ ) {
@@ -36,14 +36,15 @@
/**
* IME Class
* @class
*
* @class
* @constructor
* @param {HTMLElement} element Element on which to listen for events
* @param {TextEntry} textEntry Text entry object to use to get/set text
* @param {Object} [options]
* @param {Function} [options.helpHandler] Called for each input method row in the selector
* @param {Object} options.helpHandler.imeSelector
* @param {String} options.helpHandler.ime Id of the input method
* @param {Object} [options.helpHandler.imeSelector]
* @param {string} [options.helpHandler.ime] Id of the input method
*/
function IME( element, textEntry, options ) {
this.$element = $( element );
@@ -145,9 +146,9 @@
* @param {string} input
* @param {string} context
* @param {boolean} altGr whether altGr key is pressed or not
* @returns {object} transliteration object
* @returns {bool} return.noop Whether to consider input processed or passed through.
* @returns {string} return.output the transliterated input or input unmodified.
* @return {Object} Transliteration object
* @return {boolean} return.noop Whether to consider input processed or passed through.
* @return {string} return.output The transliterated input or input unmodified.
*/
transliterate: function ( input, context, altGr ) {
var patterns, regex, rule, replacement, i, retval;
@@ -218,8 +219,9 @@
/**
* Keypress handler
*
* @param {jQuery.Event} e Event
* @returns {Boolean}
* @return {boolean}
*/
keypress: function ( e ) {
var altGr = false,
@@ -289,7 +291,8 @@
/**
* Check whether the input method is active or not
* @returns {Boolean}
*
* @return {boolean}
*/
isActive: function () {
return this.active;
@@ -327,7 +330,8 @@
/**
* Get the current input method
* @returns {string} Current input method id
*
* @return {string} Current input method id
*/
getIM: function () {
return this.inputmethod;
@@ -335,6 +339,7 @@
/**
* Set the current input method
*
* @param {string} inputmethodId
* @fires imeLanguageChange
*/
@@ -346,9 +351,10 @@
/**
* Set the current Language
*
* @param {string} languageCode
* @fires imeLanguageChange
* @returns {Boolean}
* @return {boolean}
*/
setLanguage: function ( languageCode ) {
if ( !$.ime.languages[ languageCode ] ) {
@@ -365,7 +371,8 @@
/**
* Get current language
* @returns {string}
*
* @return {string}
*/
getLanguage: function () {
return this.language;
@@ -373,6 +380,7 @@
/**
* load an input method by given id
*
* @param {string} inputmethodId
* @return {jQuery.Promise}
*/
@@ -383,8 +391,8 @@
/**
* TextEntry factory
* @class
*
* @class
* @constructor
*/
TextEntryFactory = function IMETextEntryFactory() {
@@ -400,7 +408,7 @@
/**
* Register a TextEntry class, with priority over previous registrations
*
* @param {TextEntry} Class to register
* @param {TextEntry} TextEntryClass Class to register
*/
TextEntryFactory.prototype.register = function ( TextEntryClass ) {
this.TextEntryClasses.unshift( TextEntryClass );
@@ -429,8 +437,8 @@
/**
* Generic text entry
* @class
*
* @class
* @abstract
*/
TextEntry = function IMETextEntry() {
@@ -460,7 +468,7 @@
* This SHOULD return the empty string for non-collapsed selections.
*
* @param {number} maxLength Maximum number of chars (code units) to return
* @return {String} Up to maxLength of text
* @return {string} Up to maxLength of text
*/
TextEntry.prototype.getTextBeforeSelection = null;
@@ -468,14 +476,14 @@
* Replace the currently selected text and/or text before the selection
*
* @param {number} precedingCharCount Number of chars before selection to replace
* @param {String} newText Replacement text
* @param {string} newText Replacement text
*/
TextEntry.prototype.replaceTextAtSelection = null;
/**
* TextEntry class for input/textarea widgets
* @class
*
* @class
* @constructor
* @param {jQuery} $element The element to wrap
*/
@@ -567,9 +575,9 @@
/**
* Get the current selection offsets inside the widget
*
* @return {Object} Offsets in chars (0 means first offset *or* no selection in widget)
* @return.start {number} Selection start
* @return.end {number} Selection end
* @return {Object} return Offsets in chars (0 means first offset *or* no selection in widget)
* @return {number} return.start Selection start
* @return {number} return.end Selection end
*/
FormWidgetEntry.prototype.getCaretPosition = function () {
var el = this.$element.get( 0 ),
@@ -628,8 +636,8 @@
/**
* TextEntry class for ContentEditable
* @class
*
* @class
* @constructor
* @param {jQuery} $element The element to wrap
*/
@@ -748,6 +756,7 @@
/**
* jQuery plugin ime
*
* @param {Object} option
*/
$.fn.ime = function ( option ) {
@@ -793,6 +802,7 @@
/**
* load an input method by given id
*
* @param {string} inputmethodId
* @return {jQuery.Promise}
*/
@@ -936,8 +946,8 @@
this.timer = setTimeout(
function () {
imeselector.$imeSetting.animate( {
'opacity': 0,
'marginTop': '-20px'
opacity: 0,
marginTop: '-20px'
}, 500, function () {
imeselector.$imeSetting.hide();
// Restore properties for the next time it becomes visible:
@@ -1440,6 +1450,7 @@
/**
* Create a help link element.
*
* @return {jQuery}
*/
helpLink: function () {
@@ -1447,8 +1458,8 @@
.append( $( '<a>' ).text( 'Help' )
.addClass( 'selectable-row-item' )
.attr( {
'href': 'http://github.com/wikimedia/jquery.ime',
'target': '_blank',
href: 'http://github.com/wikimedia/jquery.ime',
target: '_blank',
'data-i18n': 'jquery-ime-help'
} )
);
@@ -1523,7 +1534,7 @@
* Check whether a keypress event corresponds to the shortcut key
*
* @param {event} event
* @return {bool} true if the key is a shortcut key
* @return {boolean} true if the key is a shortcut key
*/
function isShortcutKey( event ) {
// 77 - The letter M, for Ctrl-M
@@ -1553,9 +1564,9 @@
}
$.fn.attrchange = function ( callback ) {
if ( MutationObserver ) {
var observer;
if ( MutationObserver ) {
observer = new MutationObserver( function ( mutations ) {
mutations.forEach( function ( e ) {
callback.call( e.target, e.attributeName );
@@ -1590,7 +1601,7 @@
previousLanguages: [], // array of previous languages
previousInputMethods: [], // array of previous inputmethods
imes: {
'en': 'system'
en: 'system'
}
},
@@ -2054,7 +2065,7 @@
name: 'لۊری شومالی',
source: 'rules/lrc/lrc-kbd.js'
},
'mh': {
mh: {
name: 'Kajin M̧ajeļ',
source: 'rules/mh/mh.js'
},
@@ -2292,39 +2303,39 @@
} );
$.extend( $.ime.languages, {
'ady': {
ady: {
autonym: 'адыгэбзэ',
inputmethods: [ 'cyrl-palochka' ]
},
'ahr': {
ahr: {
autonym: 'अहिराणी',
inputmethods: [ 'mr-transliteration', 'mr-inscript' ]
},
'am': {
am: {
autonym: 'አማርኛ',
inputmethods: [ 'am-transliteration' ]
},
'ar': {
ar: {
autonym: 'العربية',
inputmethods: [ 'ar-kbd' ]
},
'as': {
as: {
autonym: 'অসমীয়া',
inputmethods: [ 'as-transliteration', 'as-avro', 'as-bornona', 'as-inscript', 'as-phonetic', 'as-inscript2', 'as-rodali' ]
},
'av': {
av: {
autonym: 'авар',
inputmethods: [ 'cyrl-palochka' ]
},
'azb': {
azb: {
autonym: 'تۆرکجه',
inputmethods: [ 'azb-kbd' ]
},
'bbc': {
bbc: {
autonym: 'Batak',
inputmethods: [ 'batak-qwerty' ]
},
'be': {
be: {
autonym: 'беларуская',
inputmethods: [ 'be-transliteration', 'be-latin', 'be-kbd' ]
},
@@ -2332,203 +2343,203 @@
autonym: 'беларуская (тарашкевіца)',
inputmethods: [ 'be-transliteration', 'be-latin' ]
},
'bh': {
bh: {
autonym: 'भोजपुरी',
inputmethods: [ 'hi-transliteration' ]
},
'bgn': {
bgn: {
autonym: 'روچ کپتین بلوچی',
inputmethods: [ 'bgn-kbd' ]
},
'bho': {
bho: {
autonym: 'भोजपुरी',
inputmethods: [ 'hi-transliteration' ]
},
'bn': {
bn: {
autonym: 'বাংলা',
inputmethods: [ 'bn-avro', 'bn-inscript', 'bn-nkb', 'bn-probhat', 'bn-inscript2' ]
},
'bo': {
bo: {
autonym: 'བོད་ཡིག།',
inputmethods: [ 'bo-ewts' ]
},
'brx': {
brx: {
autonym: 'बोड़ो',
inputmethods: [ 'brx-inscript', 'brx-inscript2' ]
},
'ckb': {
ckb: {
autonym: 'کوردیی ناوەندی',
inputmethods: [ 'ckb-transliteration-arkbd', 'ckb-transliteration-fakbd', 'ckb-transliteration-lakbd' ]
},
'ce': {
ce: {
autonym: 'нохчийн',
inputmethods: [ 'cyrl-palochka' ]
},
'cv': {
cv: {
autonym: 'Чăвашла',
inputmethods: [ 'cv-cyr-altgr', 'cv-lat-altgr', 'cv-cyr-numbers' ]
},
'da': {
da: {
autonym: 'Dansk',
inputmethods: [ 'da-normforms' ]
},
'de': {
de: {
autonym: 'Deutsch',
inputmethods: [ 'de-transliteration' ]
},
'diq': {
diq: {
autonym: 'Kirdkî',
inputmethods: [ 'ku-h', 'ku-tr' ]
},
'doi': {
doi: {
autonym: 'डोगरी',
inputmethods: [ 'doi-inscript2' ]
},
'en': {
en: {
autonym: 'English',
inputmethods: [ 'ipa-sil', 'ipa-x-sampa' ]
},
'el': {
el: {
autonym: 'Ελληνικά',
inputmethods: [ 'el-kbd' ]
},
'eo': {
eo: {
autonym: 'Esperanto',
inputmethods: [ 'eo-transliteration', 'eo-h', 'eo-h-f', 'eo-plena', 'eo-q', 'eo-vi', 'eo-x' ]
},
'fa': {
fa: {
autonym: 'فارسی',
inputmethods: [ 'fa-kbd' ]
},
'fo': {
fo: {
autonym: 'Føroyskt',
inputmethods: [ 'fo-normforms' ]
},
'fi': {
fi: {
autonym: 'Suomi',
inputmethods: [ 'fi-transliteration' ]
},
'lrc': {
lrc: {
autonym: 'لۊری شومالی',
inputmethods: [ 'lrc-kbd' ]
},
'lud': {
lud: {
autonym: 'lüüdi',
inputmethods: [ 'lud-transliteration' ]
},
'gom': {
gom: {
autonym: 'गोवा कोंकणी / Gova Konknni',
inputmethods: [ 'hi-transliteration', 'hi-inscript', 'gom-inscript2' ]
},
'gu': {
gu: {
autonym: 'ગુજરાતી',
inputmethods: [ 'gu-transliteration', 'gu-inscript', 'gu-inscript2', 'gu-phonetic' ]
},
'he': {
he: {
autonym: 'עברית',
inputmethods: [ 'he-standard-2012-extonly', 'he-standard-2012' ]
},
'hi': {
hi: {
autonym: 'हिन्दी',
inputmethods: [ 'hi-transliteration', 'hi-inscript', 'hi-bolnagri', 'hi-phonetic', 'hi-inscript2' ]
},
'hr': {
hr: {
autonym: 'Hrvatski',
inputmethods: [ 'hr-kbd' ]
},
'hy': {
hy: {
autonym: 'հայերեն',
inputmethods: [ 'hy-ephonetic', 'hy-typewriter', 'hy-ephoneticalt', 'hy-emslegacy', 'hy-wmslegacy' ]
},
'hne': {
hne: {
autonym: 'छत्तीसगढ़ी',
inputmethods: [ 'hi-transliteration' ]
},
'is': {
is: {
autonym: 'Íslenska',
inputmethods: [ 'is-normforms' ]
},
'fonipa': {
fonipa: {
autonym: 'International Phonetic Alphabet',
inputmethods: [ 'ipa-sil', 'ipa-x-sampa' ]
},
'jv': {
jv: {
autonym: 'ꦧꦱꦗꦮ',
inputmethods: [ 'jv-transliteration' ]
},
'ka': {
ka: {
autonym: 'ქართული ენა',
inputmethods: [ 'ka-transliteration', 'ka-kbd' ]
},
'kbd': {
kbd: {
autonym: 'адыгэбзэ (къэбэрдеибзэ)',
inputmethods: [ 'cyrl-palochka' ]
},
'kk': {
kk: {
autonym: 'Қазақша',
inputmethods: [ 'kk-kbd', 'kk-arabic' ]
},
'kn': {
kn: {
autonym: 'ಕನ್ನಡ',
inputmethods: [ 'kn-transliteration', 'kn-inscript', 'kn-kgp', 'kn-inscript2' ]
},
'ks': {
ks: {
autonym: 'कॉशुर / کٲشُر',
inputmethods: [ 'ks-inscript', 'ks-kbd' ]
},
'ky': {
ky: {
autonym: 'Кыргыз',
inputmethods: [ 'ky-cyrl-alt' ]
},
'kab': {
kab: {
autonym: 'ⵜⴰⵇⴱⴰⵢⵍⵉⵜ',
inputmethods: [ 'ber-tfng' ]
},
'ku': {
ku: {
autonym: 'Kurdî',
inputmethods: [ 'ku-h', 'ku-tr' ]
},
'lbe': {
lbe: {
autonym: 'лакку',
inputmethods: [ 'cyrl-palochka' ]
},
'lez': {
lez: {
autonym: 'лезги',
inputmethods: [ 'cyrl-palochka' ]
},
'lo': {
lo: {
autonym: 'ລາວ',
inputmethods: [ 'lo-kbd' ]
},
'mai': {
mai: {
autonym: 'मैथिली',
inputmethods: [ 'mai-inscript', 'mai-inscript2' ]
},
'mh': {
mh: {
autonym: 'Kajin M̧ajeļ',
inputmethods: [ 'mh' ]
},
'ml': {
ml: {
autonym: 'മലയാളം',
inputmethods: [ 'ml-transliteration', 'ml-inscript', 'ml-inscript2' ]
},
'mn': {
mn: {
autonym: 'Монгол',
inputmethods: [ 'mn-cyrl' ]
},
'mni': {
mni: {
autonym: 'Manipuri',
inputmethods: [ 'mni-inscript2' ]
},
'mr': {
mr: {
autonym: 'मराठी',
inputmethods: [ 'mr-transliteration', 'mr-inscript2', 'mr-inscript', 'mr-phonetic' ]
},
'my': {
my: {
autonym: 'မြန်မာ',
inputmethods: [ 'my-xkb' ]
},
'ne': {
ne: {
autonym: 'नेपाली',
inputmethods: [ 'ne-transliteration', 'ne-inscript2', 'ne-inscript', 'ne-rom', 'ne-trad' ]
},
@@ -2536,123 +2547,123 @@
autonym: 'नेपाल भाषा',
inputmethods: [ 'hi-transliteration', 'hi-inscript' ]
},
'nb': {
nb: {
autonym: 'Norsk (bokmål)',
inputmethods: [ 'nb-normforms', 'nb-tildeforms' ]
},
'nn': {
nn: {
autonym: 'Norsk (nynorsk)',
inputmethods: [ 'nb-normforms', 'nn-tildeforms' ]
},
'or': {
or: {
autonym: 'ଓଡ଼ିଆ',
inputmethods: [ 'or-phonetic', 'or-transliteration', 'or-inscript', 'or-inscript2', 'or-lekhani', 'or-OdiScript' ]
},
'pa': {
pa: {
autonym: 'ਪੰਜਾਬੀ',
inputmethods: [ 'pa-transliteration', 'pa-inscript', 'pa-phonetic', 'pa-inscript2', 'pa-jhelum' ]
},
'rif': {
rif: {
autonym: 'ⵜⴰⵔⵉⴼⵉⵜ',
inputmethods: [ 'ber-tfng' ]
},
'ru': {
ru: {
autonym: 'русский',
inputmethods: [ 'ru-jcuken', 'ru-kbd', 'ru-phonetic', 'ru-yawerty' ]
},
'sah': {
sah: {
autonym: 'саха тыла',
inputmethods: [ 'sah-transliteration' ]
},
'sa': {
sa: {
autonym: 'संस्कृत',
inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript', 'sa-iast' ]
},
'sat': {
sat: {
autonym: 'संताली',
inputmethods: [ 'sat-inscript2' ]
},
'sd': {
sd: {
autonym: 'सिंधी',
inputmethods: [ 'sd-inscript2' ]
},
'sdh': {
sdh: {
autonym: 'کوردی خوارگ',
inputmethods: [ 'sdh-kbd' ]
},
'se': {
se: {
autonym: 'Davvisámegiella',
inputmethods: [ 'se-normforms' ]
},
'shi': {
shi: {
autonym: 'ⵜⴰⵛⵍⵃⵉⵜ',
inputmethods: [ 'ber-tfng' ]
},
'si': {
si: {
autonym: 'සිංහල',
inputmethods: [ 'si-singlish', 'si-wijesekara' ]
},
'sk': {
sk: {
autonym: 'Slovenčina',
inputmethods: [ 'sk-kbd' ]
},
'sr': {
sr: {
autonym: 'Српски / srpski',
inputmethods: [ 'sr-kbd' ]
},
'sv': {
sv: {
autonym: 'Svenska',
inputmethods: [ 'sv-normforms' ]
},
'ta': {
ta: {
autonym: 'தமிழ்',
inputmethods: [ 'ta-transliteration', 'ta-99', 'ta-inscript', 'ta-bamini', 'ta-inscript2' ]
},
'tcy': {
tcy: {
autonym: 'ತುಳು',
inputmethods: [ 'kn-transliteration' ]
},
'te': {
te: {
autonym: 'తెలుగు',
inputmethods: [ 'te-transliteration', 'te-inscript', 'te-inscript2', 'te-apple', 'te-modular' ]
},
'th': {
th: {
autonym: 'ไทย',
inputmethods: [ 'th-kedmanee', 'th-pattachote' ]
},
'tkr': {
tkr: {
autonym: 'цӀаӀхна миз',
inputmethods: [ 'cyrl-palochka' ]
},
'tzm': {
tzm: {
autonym: 'ⵜⴰⵎⴰⵣⵉⵖⵜ',
inputmethods: [ 'ber-tfng' ]
},
'udm': {
udm: {
autonym: 'удмурт',
inputmethods: [ 'udm-alt' ]
},
'uk': {
uk: {
autonym: 'Українська',
inputmethods: [ 'uk-kbd' ]
},
'ug': {
ug: {
autonym: 'ئۇيغۇرچە / Uyghurche',
inputmethods: [ 'ug-kbd' ]
},
'ur': {
ur: {
autonym: 'اردو',
inputmethods: [ 'ur-transliteration', 'ur-phonetic' ]
},
'uz': {
uz: {
autonym: 'Oʻzbekcha',
inputmethods: [ 'uz-kbd' ]
},
'vec': {
vec: {
autonym: 'Venetian',
inputmethods: [ 'vec-GVU' ]
},
'yo': {
yo: {
autonym: 'Yorùbá',
inputmethods: [ 'yo-alt' ]
}

View File

@@ -2,7 +2,8 @@
'use strict';
function prepareRules() {
var rules = [], chars;
var rules = [],
chars;
chars = {
C: 'Ĉ',

View File

@@ -10,7 +10,7 @@
author: 'Amir E. Aharoni (אָמִיר אֱלִישָׁע אַהֲרוֹנִי, [[User:Amire80]])',
license: 'GPLv3',
version: '1.0',
patterns: [], //// Empty, because the assumption is that the user is using a Hebrew keyboard already
patterns: [], // Empty, because the assumption is that the user is using a Hebrew keyboard already
patterns_x: [
[ '\u05E9', 'ְ' ], // Sheva, ש

View File

@@ -107,8 +107,7 @@
[ 'z', 'ଭ' ],
[ 'Z', 'ଙ' ],
[ '`', '।' ],
['~', ''],
[ '~', '' ]
]
};