From 2a403e407a817981433e3b5db436049f4326c3b6 Mon Sep 17 00:00:00 2001 From: Kartik Mistry Date: Thu, 20 Feb 2014 17:11:03 +0530 Subject: [PATCH] Update jquery.ime from upstream Upstream: https://github.com/wikimedia/jquery.ime Changes: * Optimize all SVGs. * Removed unused images/ime-inactive.* files. * Renamed: rules/README -> rules/README.md Also, updated version in UniversalLanguageSelector.php Change-Id: Ifd848da55e8ac68ef63fef5d435ecc23fc20e000 --- UniversalLanguageSelector.php | 2 +- lib/jquery.ime/images/ime-active.svg | 57 +------------------ lib/jquery.ime/images/ime-inactive.png | Bin 314 -> 0 bytes lib/jquery.ime/images/ime-inactive.svg | 56 ------------------ lib/jquery.ime/images/tick.svg | 52 +---------------- lib/jquery.ime/jquery.ime.js | 2 +- lib/jquery.ime/rules/{README => README.md} | 63 +++++++++++---------- 7 files changed, 37 insertions(+), 195 deletions(-) delete mode 100644 lib/jquery.ime/images/ime-inactive.png delete mode 100644 lib/jquery.ime/images/ime-inactive.svg rename lib/jquery.ime/rules/{README => README.md} (69%) diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index 1375c724..b21c7af4 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -25,7 +25,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { /** * Version number used in extension credits and in other placed where needed. */ -define( 'ULS_VERSION', '2014-02-10' ); +define( 'ULS_VERSION', '2014-02-20' ); $GLOBALS['wgExtensionCredits']['other'][] = array( 'path' => __FILE__, diff --git a/lib/jquery.ime/images/ime-active.svg b/lib/jquery.ime/images/ime-active.svg index b850c0cd..a9dcfdb2 100644 --- a/lib/jquery.ime/images/ime-active.svg +++ b/lib/jquery.ime/images/ime-active.svg @@ -1,56 +1 @@ - - - -image/svg+xml - \ No newline at end of file + \ No newline at end of file diff --git a/lib/jquery.ime/images/ime-inactive.png b/lib/jquery.ime/images/ime-inactive.png deleted file mode 100644 index 430c30169234fd57ac552ce49ca11a21d43de5f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngj!2%??{N%3#DW+m4&kzod&^K-%LCyk?$YKTt zwlWZA)KtrF018T$xJHx&=ckpFCl;kLl$V$5W#(lUCnpx9>g5-u&wghk1yr=t)5S4F zBD}U|Be!FqOly7j*(E+g8~0pIFwpGjih2I$owAX~dX1wA4pq|c@BaTOH80NN*RN&k zi;r}Ri{#$_cJZ>RR@^;7{kW1$scl)WHR|2;otzJApUrQ1C+}n~>+8;AdBN0b*LAc0 znY)$?Ta{eAx-c_wnXlVqsj`_pFE)Md5af&axF{@n>zb diff --git a/lib/jquery.ime/images/ime-inactive.svg b/lib/jquery.ime/images/ime-inactive.svg deleted file mode 100644 index e1f01f67..00000000 --- a/lib/jquery.ime/images/ime-inactive.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - -image/svg+xml - \ No newline at end of file diff --git a/lib/jquery.ime/images/tick.svg b/lib/jquery.ime/images/tick.svg index 31618d44..1e548a3c 100644 --- a/lib/jquery.ime/images/tick.svg +++ b/lib/jquery.ime/images/tick.svg @@ -1,51 +1 @@ - - - -image/svg+xml - \ No newline at end of file + \ No newline at end of file diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index c87b26b9..c244df44 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20140211 +/*! jquery.ime - v0.1.0+20140220 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { diff --git a/lib/jquery.ime/rules/README b/lib/jquery.ime/rules/README.md similarity index 69% rename from lib/jquery.ime/rules/README rename to lib/jquery.ime/rules/README.md index ca019054..b314bf42 100644 --- a/lib/jquery.ime/rules/README +++ b/lib/jquery.ime/rules/README.md @@ -3,36 +3,38 @@ jQuery.ime Input method specification Input methods are defined in javascript files. An input method is a javascript object and it is passed to $.ime.register() method to register with jquery.ime - - Eg: $.ime.register( hebrewStandardKeyboard ); - + +eg: $.ime.register( hebrewStandardKeyboard ); + Metadata fields --------------- -id: A mandatory unique identifier that represents the input method. Eg: "hindi-inscript" +id: A mandatory unique identifier that represents the input method. +eg: "hindi-inscript" -name: A mandatory short name for the input method. Eg: Hindi InScript +name: A mandatory short name for the input method. eg: Hindi InScript -description: An optional short description about the input method. Eg: "keyboard layout as per -inscript standard" +description: An optional short description about the input method. +eg: "keyboard layout as per inscript standard" -date: An optional string to represent when this input method was written. Format should be -yyyy-mm-dd +date: An optional string to represent when this input method was written. +Format should be: yyyy-mm-dd -author: An optional string containing the authors name. Can contain email address as well. Eg: -"Santhosh Thottingal, " +author: An optional string containing the authors name. Can contain email +address as well. eg: "Santhosh Thottingal, " URL: An optional string containing URL for the original input method definition. -license: An optional string containing licence information. Eg: "CC-BY_SA" or "GPLv3" +license: An optional string containing licence information. Eg: "CC-BY-SA" or +"GPLv3". -version: An optional string containing version information +version: An optional string containing version information. Input method definition ----------------------- -patterns: A regular expression table that maps the original inputs to the target -language +patterns: A regular expression table that maps the original inputs to the +target language. eg: patterns: [ @@ -59,7 +61,8 @@ More examples [ '([ക-ഹ])a', '$1ാ' ] [ '(([ൺ-ൿം])\u200c+)?I', '$2ഐ' ] -In the above example, $1, $1 etc are according to the normal regular expression replace syntax +In the above example, $1, $1 etc are according to the normal regular expression +replace syntax. The second member of pattern can be a function as well. For eg: @@ -67,10 +70,10 @@ patterns: [ [ '[a-z]', function ( $1 ) { return $1.toUpperCase(); } ] ] -This rule replace all key strokes to its upper case character +This rule replace all key strokes to its upper case character. -contextLength: Length of the context to remember. jquery.ime can replace the text -based on the previously typed characters. Eg: +contextLength: Length of the context to remember. jquery.ime can replace the +text based on the previously typed characters. eg: [ 'ൿh', 'c', 'ച്' ] @@ -78,19 +81,21 @@ Note that this pattern definition has 3 members, the middle one is the context. This rule is interpreted as The current key is h, previous key is c. For the previous key press c, we have -a transliteration ൿ. But if it is followed by h and ൿ is indeed from key press c, -replace ൿh with ച് +a transliteration ൿ. But if it is followed by h and ൿ is indeed from key press +c, replace ൿh with ച് -To make this work, we need to remember the previous key strokes. How many of them we -need to remember? contextLength should have that value. +To make this work, we need to remember the previous key strokes. How many of +them we need to remember? contextLength should have that value. -This is optional field with default value 0.ie, we dont remember previous key strokes -by default. +This is optional field with default value 0. ie, we don't remember previous key +strokes by default. -maxKeyLength: While trying to find possible matches, we need to know how many characters -from the current typing location(cursor) should be used before giving up. +maxKeyLength: While trying to find possible matches, we need to know how many +characters from the current typing location(cursor) should be used before +giving up. -maxKeyLength defines it. Normally it is the length of largest regex sequence in the patterns. +maxKeyLength defines it. Normally it is the length of largest regex sequence in +the patterns. This field is optional and default value is 1. @@ -99,5 +104,3 @@ Examples For complete examples, please refer the existing input method definitions. - - \ No newline at end of file