Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/70408
Change subject: Update jquery.ime from upstream ...................................................................... Update jquery.ime from upstream Version: v0.1.0+20130625 * Add sa-iast input method * Fix bug https://github.com/wikimedia/jquery.ime/issues/188 Bug: 49515 Change-Id: I8ebd5bc4857285eb29d0ec6741cc6953ac187722 --- M lib/jquery.ime/jquery.ime.js A lib/jquery.ime/rules/sa/sa-iast.js 2 files changed, 76 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/08/70408/1 diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 148f09c..f252ba5 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20130624 +/*! jquery.ime - v0.1.0+20130625 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -666,7 +666,9 @@ * @param {jQuery.Event} e */ keydown: function ( e ) { - var ime = $( e.target ).data( 'ime' ); + var ime = $( e.target ).data( 'ime' ), + firstInputmethod, + languageCode; this.focus(); // shows the trigger in case it is hidden @@ -677,7 +679,14 @@ if ( this.inputmethod !== null ) { this.selectIM( this.inputmethod.id ); } else { - this.selectLanguage( this.decideLanguage() ); + languageCode = this.decideLanguage(); + this.selectLanguage( languageCode ); + if ( !ime.isActive() && $.ime.languages[languageCode] ) { + // Even after pressing toggle shortcut again, it is still disabled + // Provide the default input method in this case. + firstInputmethod = $.ime.languages[languageCode].inputmethods[0]; + this.selectIM( firstInputmethod ); + } } } @@ -1610,6 +1619,10 @@ name: 'yawerty', source: 'rules/ru/ru-yawerty.js' }, + 'sa-iast': { + name: 'Romanized', + source: 'rules/sa/sa-iast.js' + }, 'sa-inscript': { name: 'इनस्क्रिप्ट', source: 'rules/sa/sa-inscript.js' @@ -1903,7 +1916,7 @@ }, 'sa': { autonym: 'संस्कृत', - inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript' ] + inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript', 'sa-iast' ] }, 'sat': { autonym: 'संताली', diff --git a/lib/jquery.ime/rules/sa/sa-iast.js b/lib/jquery.ime/rules/sa/sa-iast.js new file mode 100644 index 0000000..9a22b41 --- /dev/null +++ b/lib/jquery.ime/rules/sa/sa-iast.js @@ -0,0 +1,59 @@ +( function ( $ ) { + 'use strict'; + + var saIast = { + id: 'sa-iast', + name: 'Romanized', + description: 'Romanized input method for Sanskrit with IAST/ISO 15919 convention. Original author William Giddings <wjgiddi...@googlemail.com>', + date: '2013-03-18', + URL: 'http://github.com/wikimedia/jquery.ime', + author: 'Runa Bhattacharjee', + license: 'GPLv3', + version: '1.0', + contextLength: 0, + maxKeyLength: 2, + patterns: [ + ['aa', 'ā'], + ['AA', 'Ā'], + ['\\^a', 'â'], + ['\\^A', 'Â'], + ['ii', 'ī'], + ['II', 'Ī'], + ['uu', 'ū'], + ['UU', 'Ū'], + ['\\.r', 'ṛ'], + ['\\.R', 'Ṛ'], + ['ṛr', 'ṝ'], + ['ṚR', 'Ṝ'], + ['\\.l', 'ḷ'], + ['\\.L', 'Ḷ'], + ['ḷl', 'ḹ'], + ['ḶL', 'Ḹ'], + ['\\.M', 'Ṃ'], + ['\\.m', 'ṃ'], + ['\\.h', 'ḥ'], + ['\\.H', 'Ḥ'], + [';n', 'ṅ'], + [';N', 'Ṅ'], + ['~n', 'ñ'], + ['~N', 'Ñ'], + ['\\.t', 'ṭ'], + ['\\.T', 'Ṭ'], + ['\\.d', 'ḍ'], + ['\\.D', 'Ḍ'], + ['\\.n', 'ṇ'], + ['\\.N', 'Ṇ'], + [';s', 'ś'], + [';S', 'Ś'], + ['\\.s', 'ṣ'], + ['\\.S', 'Ṣ'], + ['ee', 'ē'], + ['oo', 'ō'], + [';m', 'ṁ'], + [',r', 'r̥'], + ['r̥r', 'r̥̄'] + ] + }; + $.ime.register( saIast ); + +}( jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/70408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ebd5bc4857285eb29d0ec6741cc6953ac187722 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits