r103733 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103732‎ | r103733 | r103734 >
Date:06:43, 20 November 2011
Author:amire80
Status:ok
Tags:
Comment:
Adding Gujarati keyboard mapping by Jaldeep R Vasavada.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/js/ext.narayam.rules.gu.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -53,6 +53,7 @@
5454 'narayam-bn-inscript' => 'Bengali InScript',
5555 'narayam-bn-nkb' => 'Bengali NKB',
5656 'narayam-ur' => 'Urdu standard',
 57+ 'narayam-gu' => 'Gujarai transliteration',
5758 );
5859
5960 /** Message documentation (Message documentation)
Index: trunk/extensions/Narayam/js/ext.narayam.rules.gu.js
@@ -0,0 +1,171 @@
 2+/**
 3+ * Trasliteration regular expression rules table for Sanskrit
 4+ * @author Jaldeep R Vasavada ([[user:JaldeepVasavada]])
 5+ * @date 2011-11-19
 6+ * License: GPLv3, CC-BY-SA 3.0
 7+ */
 8+
 9+ // Normal rules
 10+var rules = [
 11+['ક्h','c','ચ'],
 12+['\\\\([A-Za-z\\>_~\\.0-9])','\\\\','$1'],
 13+
 14+['([ક-હ]़?)्a', '','$1'],
 15+['([ક-હ]़?)्A', '','$1ા'],
 16+['([ક-હ]़?)a', '','$1ા'],
 17+['([ક-હ]़?)्i', '','$1િ'],
 18+['([ક-હ]़?)(्I|િi|ॆe)', '','$1ી'],
 19+['([ક-હ]़?)्u', '','$1ુ'],
 20+['([ક-હ]़?)(ુu|्U|ોo)', '','$1ૂ'],
 21+['([ક-હ]़?)्R', '','$1ृ'],
 22+['([ક-હ]़?)ृR', '','$1ॄ'],
 23+['([ક-હ]़?)्ળl', '','$1ॢ'],
 24+['([ક-હ]़?)ॢl', '','$1ॣ'],
 25+['([ક-હ]़?)ॆ\\^', '','$1ॅ'],
 26+['([ક-હ]़?)्e', '','$1ॆ'],
 27+['([ક-હ]़?)्E', '','$1ૅ'],
 28+['([ક-હ]़?)ો\\^', '','$1ૉ'],
 29+['([ક-હ]़?)i', '','$1ૈ'],
 30+['([ક-હ]़?)्o', '','$1ો'],
 31+['([ક-હ]़?)्O', '','$1ો'],
 32+['([ક-હ]़?)u', '','$1ૌ'],
 33+
 34+['([ક-હ]़?)ृa', '','$1्ऱ'],
 35+['([ક-હ]़?)ृA', '','$1्ऱા'],
 36+['([ક-હ]़?)ृi', '','$1्ऱિ'],
 37+['([ક-હ]़?)ृI', '','$1्ऱી'],
 38+['([ક-હ]़?)ृu', '','$1्ऱુ'],
 39+['([ક-હ]़?)ृU', '','$1्ऱૂ'],
 40+['([ક-હ]़?)ृ\\^', '','$1्ऱॅ'],
 41+['([ક-હ]़?)ृe', '','$1्ऱॆ'],
 42+['([ક-હ]़?)ृE', '','$1्ऱૅ'],
 43+['([ક-હ]़?)ृo', '','$1्ऱો'],
 44+['([ક-હ]़?)ृO', '','$1्ऱો'],
 45+['([ક-હ]़?)ृ\\~', '','$1्ऱ्'],
 46+
 47+['([ક-હ])्\\`', '','$1़्'],
 48+
 49+['અa', '','આ'],
 50+['(ઑo|ઉu)', '','ઊ'],
 51+['ઍ\\^', '','એ'],
 52+['અi', '','એ'],
 53+['અ\\^', '','ઍ'],
 54+['(ઇi|ઍe)', '','ઈ'],
 55+['ઑ\\^', '','ઓ'],
 56+['અu', '','ઔ'],
 57+['ઋR', '','ૠ'],
 58+['ળl', '','ઌ'],
 59+['ઌl', '','ૡ'],//problem
 60+['ं\\^', '','ँ'],
 61+['ंm', '','ँ'],
 62+['ઓM', '','ૐ'],
 63+
 64+['રY', '','ऱ्ય'],
 65+
 66+['ક्h', '','ખ'],//kh
 67+['ગh', '','ઘ'],
 68+['નg', '','ઙ'],
 69+['ચh', '','છ'],
 70+['જh', '','ઝ'],
 71+['નj', '','ઞ'],
 72+['ટh', '','ઠ'],
 73+['ડh', '','ઢ'],
 74+['તh', '','થ'],
 75+['દh', '','ધ'],
 76+['પh', '','ફ'],
 77+['બh', '','ભ'],
 78+
 79+['ઋa', '','ऱ'],
 80+['ઋA', '','ऱા'],
 81+['ઋi', '','ऱિ'],
 82+['ઋI', '','ऱી'],
 83+['ઋu', '','ऱુ'],
 84+['ઋU', '','ऱૂ'],
 85+['ઋ\\^', '','ऱॅ'],
 86+['ઋe', '','ऱॆ'],
 87+['ઋE', '','ऱૅ'],
 88+['ઋo', '','ऱો'],
 89+['ઋO', '','ऱો'],
 90+['ઋ\\~', '','ऱ्'],
 91+
 92+['સh', '','ષ'],
 93+['ક़्h', '','ખ'],
 94+['જh', '','ऴ्'],
 95+['।\\.', '','॥'],
 96+
 97+['a', '','અ'],
 98+['b', '','બ'],
 99+['c', '','ક्'],
 100+['d', '','દ'],
 101+['e', '','ઍ'],
 102+['(f|F)', '','ફ'],
 103+['g', '','ગ'],
 104+['h', '','હ'],
 105+['i', '','ઇ'],
 106+['j', '','જ'],
 107+['k', '','ક्'],
 108+['l', '','લ'],
 109+['m', '','મ'],
 110+['n', '','ન'],
 111+['o', '','ઑ'],
 112+['p', '','પ'],
 113+['q', '','ક़्'],
 114+['r', '','ર'],
 115+['s', '','સ'],
 116+['t', '','ત'],
 117+['u', '','ઉ'],
 118+['(v|w)', '','વ'],
 119+['x', '','ક्ષ'],
 120+['y', '','ય'],
 121+['(z|Z)', '','જ'],
 122+['A', '','આ'],
 123+['B', '','બ'], //double
 124+['C', '','ક्ક्'],
 125+['D', '','ડ'],
 126+['E', '','એ'],
 127+//'F', '','ફ'],
 128+['G', '','ગ'],//double
 129+['H', '','ः'],
 130+['I', '','ઈ'],
 131+['J', '','જ'],//double
 132+['K', '','ક्ક्'],
 133+['L', '','ળ'],
 134+['M', '','ं'],
 135+['N', '','ણ'],
 136+['O', '','ઓ'],
 137+['P', '','પ'],//double
 138+//'Q', '','અ'],
 139+['R', '','ઋ'],
 140+['S', '','શ'],
 141+['T', '','ટ'],
 142+['U', '','ઊ'],
 143+['(V|W)', '','વ'],//double
 144+['X', '','ક्ષ'],
 145+['Y', '','ય'],//double
 146+//'z', '','અ'
 147+['0', '','૦'],
 148+['1', '','૧'],
 149+['2', '','૨'],
 150+['3', '','૩'],
 151+['4', '','૪'],
 152+['5', '','૫'],
 153+['6', '','૬'],
 154+['7', '','૭'],
 155+['8', '','૮'],
 156+['9', '','૯'],
 157+['~', '','्'],
 158+['\\.', '','।'],
 159+['//', '','ऽ'],
 160+['\\`', '','़'],
 161+['(\u200C)*_', '', '\u200c']
 162+];
 163+
 164+/*
 165+jQuery.narayam.addScheme( 'gu', {
 166+ 'namemsg': 'narayam-gu',
 167+ 'extended_keyboard': false,
 168+ 'lookbackLength': 4,
 169+ 'keyBufferLength': 2,
 170+ 'rules': rules
 171+} );
 172+*/
\ No newline at end of file
Index: trunk/extensions/Narayam/Narayam.php
@@ -109,6 +109,9 @@
110110 'ur' => array(
111111 'ur' => 'ext.narayam.rules.ur',
112112 ),
 113+ 'gu' => array(
 114+ 'gu' => 'ext.narayam.rules.gu',
 115+ ),
113116 );
114117
115118 /* Setup */
@@ -181,6 +184,7 @@
182185 'narayam-bn-inscript',
183186 'narayam-bn-nkb',
184187 'narayam-ur',
 188+ 'narayam-gu',
185189 ),
186190 'dependencies' => array(
187191 'mediawiki.util',
@@ -308,3 +312,7 @@
309313 'scripts' => 'js/ext.narayam.rules.ur.js',
310314 'dependencies' => 'ext.narayam.core',
311315 );
 316+$wgResourceModules['ext.narayam.rules.gu'] = $narayamTpl + array(
 317+ 'scripts' => 'js/ext.narayam.rules.gu.js',
 318+ 'dependencies' => 'ext.narayam.core',
 319+);

Follow-up revisions

RevisionCommit summaryAuthorDate
r103734Follow to r103733 - corrections.amire8006:53, 20 November 2011

Status & tagging log