Files
mediawiki-extensions-Univer…/lib/jquery.ime/rules/sa/sa-transliteration.js
Santhosh Thottingal 8f5be106f5 Update jquery.ime library
upstream: http://github.com/wikimedia/jquery.ime

changes:
* Support for contenteditable, like the VisualEditor surfaces. This
  support is very minimal now. Because of VE bugs on IME support, many
  things are broken. But one-one keyboard mappings should work with less
  issues. The UI of jquery.ime is not integrated with VE toolbar
* More input methods
	- IPA-X-SAMPA by Amir
	- Armenian keymaps by  Aleksey Chalabyan
	- Kurdish keymaps by Ghybu
	- Кыргыз keymap by Amir
	- Central Kurdish keyboards by Çalak
* A lot of input method bug fixes multiple contributors
* Minor UX fixes

Introduces Rangy library.
A module named rangy is defined in VisualEditor extension with more features of rangy.
Here we need only the core library. This module is loaded dynamically from
client when rangy is undefined. If VE is present rangy will be defined, the module
defined in VE will be used. ie, This get loaded only when VE is not present and
user trying to type in a contenteditable.

Bug: 49569
Bug: 50849
Bug: 50220

Change-Id: Iadad5a4e5972fbd1359847526d28e9dbbe00a7c4
2013-08-19 04:40:08 +00:00

166 lines
3.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

( function ( $ ) {
'use strict';
var saTransliteration = {
id: 'sa-transliteration',
name: 'Sanskrit Transliteration',
description: 'Sanskrit transliteration',
date: '2012-10-16',
URL: 'http://github.com/wikimedia/jquery.ime',
author: 'Junaid P V and Naveen Shankar',
license: 'GPLv3',
version: '1.0',
contextLength: 4,
maxKeyLength: 2,
patterns: [
['क्h','c','च्'],
['\\\\([A-Za-z\\>_~\\.0-9])','\\\\','$1'],
['([क-ह]़?)्a','$1'],
['([क-ह]़?)्A','$1ा'],
['([क-ह]़?)a','$1ा'],
['([क-ह]़?)्i','$1ि'],
['([क-ह]़?)(्I|िi|ॆe)','$1ी'],
['([क-ह]़?)्u','$1ु'],
['([क-ह]़?)(ुu|्U|ॊo)','$1ू'],
['([क-ह]़?)्R','$1ृ'],
['([क-ह]़?)ृR','$1ॄ'],
['([क-ह]़?)्ळ्l','$1ॢ'],
['([क-ह]़?)ॢl','$1ॣ'],
['([क-ह]़?)ॆ\\^','$1ॅ'],
['([क-ह]़?)्e','$1ॆ'],
['([क-ह]़?)्E','$1े'],
['([क-ह]़?)ॊ\\^','$1ॉ'],
['([क-ह]़?)i','$1ै'],
['([क-ह]़?)्o','$1ॊ'],
['([क-ह]़?)्O','$1ो'],
['([क-ह]़?)u','$1ौ'],
['([क-ह]़?)ृa','$1्ऱ'],
['([क-ह]़?)ृA','$1्ऱा'],
['([क-ह]़?)ृi','$1्ऱि'],
['([क-ह]़?)ृI','$1्ऱी'],
['([क-ह]़?)ृu','$1्ऱु'],
['([क-ह]़?)ृU','$1्ऱू'],
['([क-ह]़?)ृ\\^','$1्ऱॅ'],
['([क-ह]़?)ृe','$1्ऱॆ'],
['([क-ह]़?)ृE','$1्ऱे'],
['([क-ह]़?)ृo','$1्ऱॊ'],
['([क-ह]़?)ृO','$1्ऱो'],
['([क-ह]़?)ृ\\~','$1्ऱ्'],
['([क-ह])्\\`','$1़्'],
['अa','आ'],
['(ऒo|उu)','ऊ'],
['ऎ\\^','ऍ'],
['अi','ऐ'],
['अ\\^','ॲ'],
['(इi|ऎe)','ई'],
['ऒ\\^','ऑ'],
['अu','औ'],
['ऋR','ॠ'],
['ळ्l','ऌ'],
['ऌl','ॡ'],
['ं\\^','ँ'],
['ंm','ँ'],
['ओM','ॐ'],
['क्h','ख्'],
['ग्h','घ्'],
['न्g','ङ्'],
['च्h','छ्'],
['ज्h','झ्'],
['न्j','ञ्'],
['ट्h','ठ्'],
['ड्h','ढ्'],
['त्h','थ्'],
['द्h','ध्'],
['प्h','फ्'],
['ब्h','भ्'],
['ऋa','ऱ'],
['ऋA','ऱा'],
['ऋi','ऱि'],
['ऋI','ऱी'],
['ऋu','ऱु'],
['ऋU','ऱू'],
['ऋ\\^','ऱॅ'],
['ऋe','ऱॆ'],
['ऋE','ऱे'],
['ऋo','ऱॊ'],
['ऋO','ऱो'],
['ऋ\\~','ऱ्'],
['स्h','ष्'],
['क़्h','ख़्'],
['ज़्h','ऴ्'],
['।\\.','॥'],
['a','अ'],
['b','ब्'],
['c','क्'],
['d','द्'],
['e','ऎ'],
['(f|F)','फ़्'],
['g','ग्'],
['h','ह्'],
['i','इ'],
['j','ज्'],
['k','क्'],
['l','ल्'],
['m','म्'],
['n','न्'],
['o','ऒ'],
['p','प्'],
['q','क़्'],
['r','र्'],
['s','स्'],
['t','त्'],
['u','उ'],
['(v|w)','व्'],
['x','क्ष्'],
['y','य्'],
['(z|Z)','ज़्'],
['A','आ'],
['B','ब्ब्'],
['C','क्क्'],
['D','ड्'],
['E','ए'],
//'F','फ्'],
['G','ग्ग्'],
['H',''],
['I','ई'],
['J','ज्ज्'],
['K','क्क्'],
['L','ळ्'],
['M','ं'],
['N','ण्'],
['O','ओ'],
['P','प्प्'],
//'Q','अ'],
['R','ऋ'],
['S','श्'],
['T','ट्'],
['U','ऊ'],
['(V|W)','व्व्'],
['X','क्ष्'],
['Y','य्य्'],
//'z','अ'
['0',''],
['1','१'],
['2','२'],
['3','३'],
['4','४'],
['5','५'],
['6','६'],
['7','७'],
['8','८'],
['9','९'],
['~','्'],
['\\.','।'],
['//','ऽ'],
['\\`','़'],
['(\u200C)*_', '\u200c']]
};
$.ime.register( saTransliteration );
}( jQuery ) );