KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/148608
Change subject: Update jquery.ime from upstream ...................................................................... Update jquery.ime from upstream Changes: * Bug 66064: Remove deprecated event.attrName and use event.originalEvent.attrName instead. * Added lud transliteration layout. * Added Tibetian EWTS layout. Change-Id: Ia171faa1cbd71e31d45408d96f23f0826b914c5e --- M lib/jquery.ime/jquery.ime.js A lib/jquery.ime/rules/bo/bo-ewts.js A lib/jquery.ime/rules/lud/lud-transliteration.js 3 files changed, 364 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/08/148608/1 diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 26ff8da..00a1cf1 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20140528 +/*! jquery.ime - v0.1.0+20140723 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -1460,7 +1460,7 @@ } ); } else if ( isDOMAttrModifiedSupported() ) { return this.on( 'DOMAttrModified', function ( e ) { - callback.call( this, e.attrName ); + callback.call( this, e.originalEvent.attrName ); } ); } else if ( 'onpropertychange' in document.body ) { return this.on( 'propertychange', function () { @@ -1638,6 +1638,10 @@ name: 'প্রভাত', source: 'rules/bn/bn-probhat.js' }, + 'bo-ewts': { + name: 'Tibetan EWTS', + source: 'rules/bo/bo-ewts.js' + }, 'brx-inscript': { name: 'इनस्क्रिप्ट', source: 'rules/brx/brx-inscript.js' @@ -1721,6 +1725,10 @@ 'fi-transliteration': { name: 'translitterointi', source: 'rules/fi/fi-transliteration.js' + }, + 'lud-transliteration': { + name: 'lud', + source: 'rules/lud/lud-transliteration.js' }, 'hi-transliteration': { name: 'लिप्यंतरण', @@ -2187,6 +2195,10 @@ autonym: 'বাংলা', inputmethods: [ 'bn-avro', 'bn-inscript', 'bn-nkb', 'bn-probhat', 'bn-inscript2' ] }, + 'bo': { + autonym: 'བོད་ཡིག།', + inputmethods: [ 'bo-ewts' ] + }, 'brx': { autonym: 'बोड़ो', inputmethods: [ 'brx-inscript', 'brx-inscript2' ] @@ -2243,6 +2255,10 @@ autonym: 'Suomi', inputmethods: [ 'fi-transliteration' ] }, + 'lud': { + autonym: 'lüüdi', + inputmethods: [ 'lud-transliteration' ] + }, 'gom': { autonym: 'कोंकणी', inputmethods: [ 'hi-transliteration', 'hi-inscript', 'gom-inscript2' ] diff --git a/lib/jquery.ime/rules/bo/bo-ewts.js b/lib/jquery.ime/rules/bo/bo-ewts.js new file mode 100644 index 0000000..2122bd7 --- /dev/null +++ b/lib/jquery.ime/rules/bo/bo-ewts.js @@ -0,0 +1,317 @@ +(function ( $ ) { + 'use strict'; + var patterns = [ + // ambiguous cases with b as prefix + ['བྲk', 'r', 'བརྐ'], + ['བྲg', 'r', 'བརྒ'], + ['བྲj', 'r', 'བརྗ'], + ['བྲt', 'r', 'བརྟ'], + ['བྲd', 'r', 'བརྡ'], + ['བྲn', 'r', 'བརྣ '], + ['བྲb', 'r', 'བརྦ'], + ['བྲm', 'r', 'བརྨ'], + ['བླk', 'l', 'བལྐ'], + ['བླg', 'l', 'བལྒ'], + ['བླནg', 'n', 'བལྔ'], + ['བླc', 'l', 'བལྕ'], + ['བླj', 'l', 'བལྗ'], + ['བླt', 'l', 'བལྟ'], + ['བླd', 'l', 'བསྡ'], + ['བླp', 'l', 'བལྤ'], + ['བླb', 'l', 'བལྦ'], + ['བླh', 'l', 'བལྷ'], + // ambiguous cases with g as prefix + ['གྲk', 'r', 'གརྐ'], + ['གྲg', 'r', 'གརྒ'], + ['གྲj', 'r', 'གརྗ'], + ['གྲt', 'r', 'གརྟ'], + ['གྲd', 'r', 'གརྡ'], + ['གྲn', 'r', 'གརྣ '], + ['གྲb', 'r', 'གརྦ'], + ['གྲm', 'r', 'གརྨ'], + ['གླk', 'l', 'གལྐ'], + ['གླg', 'r', 'གལྒ'], + ['གླg', 'n', 'གལྔ'], + ['གླc', 'r', 'གལྕ'], + ['གླj', 'r', 'གལྗ'], + ['གླt', 'r', 'གལྟ'], + ['གླd', 'r', 'གསྡ'], + ['གླp', 'r', 'གལྤ'], + ['གླb', 'r', 'གལྦ'], + ['གླh', 'r', 'གལྷ'], + // ambiguous cases with d as prefix + ['དྲk', 'r', 'དརྐ'], + ['དྲg', 'r', 'དརྒ'], + ['དྲj', 'r', 'དརྗ'], + ['དྲt', 'r', 'དརྟ'], + ['དྲd', 'r', 'དརྡ'], + ['དྲn', 'r', 'དརྣ '], + ['དྲb', 'r', 'དརྦ'], + ['དྲm', 'r', 'དརྨ'], + // ambiguous cases with m as prefix + ['མྲk', 'r', 'མརྐ'], + ['མྲg', 'r', 'མརྒ'], + ['མྲj', 'r', 'མརྗ'], + ['མྲt', 'r', 'མརྟ'], + ['མྲd', 'r', 'མརྡ'], + ['མྲn', 'r', 'མརྣ '], + ['མྲb', 'r', 'མརྦ'], + ['མྲm', 'r', 'མརྨ'], + // Standard Tibetan Stacks listed at <http://www.thlib.org/reference/transliteration/tibstacks.php> + // some are handled magically and don't need to appear here. + ['རྐy', 'k', 'རྐྱ'], + ['རྒy', 'g', 'རྒྱ'], + ['རྨy', 'm', 'རྨྱ'], + ['རྒw', 'g', 'རྒྭ'], + ['རྩw', 's', 'རྩྭ'], + ['སྐy', 'k', 'སྐྱ'], + ['སྒy', 'g', 'སྒྱ'], + ['སྤy', 'p', 'སྤྱ'], + ['སྦy', 'b', 'སྦྱ'], + ['སྨy', 'm', 'སྨྱ'], + ['སྐr', 'k', 'སྐྲ'], + ['སྒr', 'g', 'སྒྲ'], + ['སྣr', 'n', 'སྣྲ'], + ['སྤr', 'p', 'སྤྲ'], + ['སྦr', 'b', 'སྦྲ'], + ['སྨr', 'm', 'སྨྲ'], + ['གྲw', 'r', 'གྲྭ'], + ['དྲw', 'r', 'དྲྭ'], + ['ཕྱw', 'y', 'ཕྱྭ'], + ['རk', 'r', 'རྐ'], + ['རg', 'r', 'རྒ'], + ['རj', 'r', 'རྗ'], + ['རt', 'r', 'རྟ'], + ['རd', 'r', 'རྡ'], + ['རn', 'r', 'རྣ '], + ['རb', 'r', 'རྦ'], + ['རm', 'r', 'རྨ'], + ['ལk', 'l', 'ལྐ'], + ['ལg', 'l', 'ལྒ'], + ['ལc', 'l', 'ལྕ'], + ['ལj', 'l', 'ལྗ'], + ['ལt', 'l', 'ལྟ'], + ['ལd', 'l', 'སྡ'], + ['ལp', 'l', 'ལྤ'], + ['ལb', 'l', 'ལྦ'], + ['ལh', 'l', 'ལྷ'], + ['སk', 's', 'སྐ'], + ['སg', 's', 'སྒ'], + ['སt', 's', 'སྟ'], + ['སd', 's', 'སྡ'], + ['སn', 's', 'སྣ'], + ['སp', 's', 'སྤ'], + ['སb', 's', 'སྦ'], + ['སm', 's', 'སྨ'], + ['སྟs', 't', 'སྩ'], + ['ཀw', 'k', 'ཀྭ'], + ['ཁw', 'h', 'ཁྭ'], + ['གw', 'g', 'གྭ'], + ['ཅw', 'c', 'ཅྭ'], + ['ཉw', 'y', 'ཉྭ'], + ['ཏw', 't', 'ཏྭ'], + ['དw', 'd', 'དྭ'], + ['ཙw', 's', 'ཙྭ'], + ['ཚw', 'h', 'ཚྭ'], + ['ཞw', 'h', 'ཞྭ'], + ['ཟw', 'z', 'ཟྭ'], + ['རw', 'r', 'རྭ'], + ['ཤw', 'h', 'ཤྭ'], + ['སw', 's', 'སྭ'], + ['ཧw', 'h', 'ཧྭ'], + ['ཀy', 'k', 'ཀྱ'], + ['ཁy', 'h', 'ཁྱ'], + ['གy', 'g', 'གྱ'], + ['པy', 'p', 'པྱ'], + ['ཕy', 'h', 'ཕྱ'], + ['བy', 'b', 'བྱ'], + ['མy', 'm', 'མྱ'], + ['ཀr', 'k', 'ཀྲ'], + ['ཁr', 'h', 'ཁྲ'], + ['གr', 'g', 'གྲ'], + ['ཏr', 't', 'ཏྲ'], + ['ཐr', 'h', 'ཐྲ'], + ['དr', 'd', 'དྲ'], + ['པr', 'p', 'པྲ'], + ['ཕr', 'h', 'ཕྲ'], + ['བr', 'b', 'བྲ'], + ['མr', 'm', 'མྲ'], + ['ཤr', 'h', 'ཤྲ'], + ['སr', 's', 'སྲ'], + ['ཧr', 'h', 'ཧྲ'], + ['ཀl', 'k', 'ཀླ'], + ['གl', 'g', 'གླ'], + ['བl', 'b', 'བླ'], + ['ཟl', 'z', 'ཟླ'], + ['རl', 'r', 'རླ'], + ['སl', 's', 'སླ'], + ['ཨོM', 'o', 'ༀ'], + ['\\.', ''], + ['\\+', ''], + ['-', ''], + ['S', ''], + // subjoined letters: + ['k', '\\+', 'ྐ'], + ['ྐh', 'ྑ'], + ['g', '\\+', 'ྒ'], + ['ྣg', 'ྔ'], + ['c', '\\+', 'ྕ'], + ['ྕh', 'ྖ'], + ['j', '\\+', 'ྗ'], + ['ྣy', 'ྙ'], + ['T', '\\+', 'ྚ'], + ['ྚh', 'ྛ'], + ['D', '\\+', 'ྜ'], + ['N', '\\+', 'ྞ'], + ['t', '\\+', 'ྟ'], + ['ྟh', 'ྠ'], + ['d', '\\+', 'ྡ'], + ['n', '\\+', 'ྣ'], + ['p', '\\+', 'ྤ'], + ['ྤh', 'ྥ'], + ['b', '\\+', 'ྦ'], + ['m', '\\+', 'ྨ'], + ['ྟs', 'ྩ'], + ['ྩh', 'ྪ'], + ['ྡz', 'ྫ'], + ['w', '\\+', 'ྭ'], + ['ྯh', 'ྮ'], + ['z', '\\+', 'ྯ'], + ['\'', '\\+', 'ྰ'], + ['y', '\\+', 'ྱ'], + ['r', '\\+', 'ྲ'], + ['l', '\\+', 'ླ'], + ['ྶh', 'ྴ'], + ['h', '\\+S', 'ྵ'], + ['s', '\\+', 'ྶ'], + ['h', '\\+', 'ྷ'], + ['v', '\\+', "ྦ༹"], + ['f', '\\+', "ྥ༹"], + ['W', '\\+', "ྺ"], + ['Y', '\\+', "ྻ"], + ['R', '\\+', "ྼ"], + ['Z', '\\+', "༹"], + // consonants + ['k', 'ཀ'], + ['ཀh', 'k', 'ཁ'], + ['g', 'ག'], + ['ནg', 'n', 'ང'], + ['c', 'ཅ'], + ['ཅh', 'c', 'ཆ'], + ['j', 'ཇ'], + ['ནy', 'n', 'ཉ'], + ['T', 'ཊ'], + ['ཊh', 'T', 'ཋ'], + ['D', 'ཌ'], + ['N', 'ཎ'], + ['t', 'ཏ'], + ['ཏh', 't', 'ཐ'], + ['d', 'ད'], + ['n', 'ན'], + ['p', 'པ'], + ['པh', 'p', 'ཕ'], + ['b', 'བ'], + ['m', 'མ'], + ['ཏs', 't', 'ཙ'], + ['ཙh', 's', 'ཚ'], + ['དz', 'd', 'ཛ'], + ['w', 'ཝ'], + ['ཟh', 'z', 'ཞ'], + ['z', 'ཟ'], + ['\'', 'འ'], + ['y', 'ཡ'], + ['r', 'ར'], + ['l', 'ལ'], + ['སh', 's', 'ཤ'], + ['h', 'S', 'ཥ'], + ['s', 'ས'], + ['h', 'ཧ'], + ['f', 'ཕ༹'], + ['v', 'བ༹'], + ['R', 'ཪ'], + // vowels after consonnants or vowels + ['([ཀ-ྼ])i', 'a', '$1ཻ'], + ['([ཀ-ྼ])u', 'a', '$1ཽ'], + ['([ཀ-ྼ])i', '-', '$1ྀ'], + ['([ཀ-ྼ])རI', 'r-', '$1ྲཱྀ'], + ['([ཀ-ྼ])ལI', 'l-', '$1ླཱྀ'], + ['རI', 'r-', 'ཨྲཱྀ'], + ['ལI', 'l-', 'ཨླཱྀ'], + ['([ཀ-ྼ])I', '-', '$1ཱྀ'], + ['([ཀ-ྼ])a', '$1'], + ['([ཀ-ྼ])i', '$1ི'], + ['([ཀ-ྼ])u', '$1ུ'], + ['([ཀ-ྼ])e', '$1ེ'], + ['([ཀ-ྼ])o', "$1ོ"], + ['([ཀ-ྼ])A', '$1ཱ'], + ['([ཀ-ྼ])I', '$1ཱི'], + ['([ཀ-ྼ])U', '$1ཱུ'], + // vowels after something else + ['a', 'ཨ'], + ['i', '-', 'ཨྀ'], + ['A', 'ཨཱ'], + ['I', '-', 'ཨཱྀ'], + ['I', 'ཨཱི'], + ['U', 'ཨཱུ'], + ['i', 'ཨི'], + ['u', 'ཨུ'], + ['e', 'ཨེ'], + ['o', 'ཨོ'], + // numbers + ['0', '༠'], + ['1', '༡'], + ['2', '༢'], + ['3', '༣'], + ['4', '༤'], + ['5', '༥'], + ['6', '༦'], + ['7', '༧'], + ['8', '༨'], + ['9', '༩'], + // sanskrit marks + ['H', "ཿ"], + ['M', "ཾ"], + ['~M', "ྃ"], + ['~M`', "ྂ"], + ['\\?', "྄"], + ['&', '྅'], + // punctuation + [' ', '་'], + ['\\*', '༌'], + ['\\/', '།'], + ['\\/\\/', '༎'], + [';', '༏'], + ['\\|', '༑'], + ['\\!', '༈'], + ['\\:', '༔'], + ['_', ' '], + ['\\=', '༴'], + ['@', '༄'], + ['#', '༅'], + ['\\$', '༆'], + ['%', '༇'], + ['<', '༺'], + ['>', '༻'], + ['\\(', '༼'], + ['\\)', '༽'], + ['~X', "༵"], + ['X', "༷"], + ['\\^', "༹"] + ]; + + var boEWTS = { + id: 'bo-ewts', + name: 'Tibetan EWTS transliteration', + description: 'Tibetan Extended Wylie Transliteration, based on <a href="http://www.thlib.org/reference/transliteration/#!essay=/thl/ewts">the work of thdl</a>.', + date: '2014-07-02', + URL: 'http://github.com/wikimedia/jquery.ime', + author: 'Elie Roux <elie.r...@telecom-bretagne.eu>', + license: 'GPLv3', + version: '0.9', + contextLength: 2, + maxKeyLength: 5, + patterns: patterns + }; + + $.ime.register( boEWTS ); +}( jQuery ) ); diff --git a/lib/jquery.ime/rules/lud/lud-transliteration.js b/lib/jquery.ime/rules/lud/lud-transliteration.js new file mode 100644 index 0000000..cfc2aa7 --- /dev/null +++ b/lib/jquery.ime/rules/lud/lud-transliteration.js @@ -0,0 +1,29 @@ +( function ( $ ) { + 'use strict'; + + var mapping = { + id: 'lud-transliteration', + name: 'lud', + description: 'Ludic transliteration', + date: '2014-06-14', + URL: 'http://github.com/wikimedia/jquery.ime', + author: 'Niklas Laxström', + license: 'MIT', + version: '1.0', + contextLength: 0, + maxKeyLength: 2, + patterns: [ + ['ch', 'č'], + ['C[hH]', 'Č'], + ['sh', 'š'], + ['S[hH]', 'Š'], + ['zh', 'ž'], + ['Z[hH]', 'Ž'], + ['y', 'ü'], + ['Y', 'Ü'], + ['\'', '’'] + ] + }; + + $.ime.register( mapping ); +}( jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/148608 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia171faa1cbd71e31d45408d96f23f0826b914c5e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits