r103735 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103734‎ | r103735 | r103736 >
Date:07:08, 20 November 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/js/ext.narayam.rules.hi.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -29,6 +29,7 @@
3030 'narayam-as-bornona' => 'Assamese Bornona',
3131 'narayam-as-inscript' => 'Assamese InScript',
3232 'narayam-eo' => 'Esperanto',
 33+ 'narayam-hi' => 'Hindi Transliteration',
3334 'narayam-hi-inscript' => 'Hindi InScript',
3435 'narayam-kn' => 'Kannada Transliteration',
3536 'narayam-kn-inscript' => 'Kannada InScript',
Index: trunk/extensions/Narayam/js/ext.narayam.rules.hi.js
@@ -0,0 +1,168 @@
 2+/**
 3+ * Transliteration regular expression rules table for Devanagari script for Hindi
 4+ * According to CDAC's "Enhanced InScript Keyboard Layout 5.2"
 5+ * @author Junaid P V ([[user:Junaidpv]])
 6+ * @date 2011-02-26
 7+ * License: GPLv3
 8+ */
 9+
 10+ // Normal rules
 11+var rules = [
 12+['क्h','c','च्'],
 13+['\\\\([A-Za-z\\>_~\\.0-9])','\\\\','$1'],
 14+
 15+['([क-ह]़?)्a', '','$1'],
 16+['([क-ह]़?)्A', '','$1ा'],
 17+['([क-ह]़?)a', '','$1ा'],
 18+['([क-ह]़?)्i', '','$1ि'],
 19+['([क-ह]़?)(्I|िi|ॆe)', '','$1ी'],
 20+['([क-ह]़?)्u', '','$1ु'],
 21+['([क-ह]़?)(ुu|्U|ॊo)', '','$1ू'],
 22+['([क-ह]़?)्R', '','$1ृ'],
 23+['([क-ह]़?)ृR', '','$1ॄ'],
 24+['([क-ह]़?)्ळ्l', '','$1ॢ'],
 25+['([क-ह]़?)ॢl', '','$1ॣ'],
 26+['([क-ह]़?)ॆ\\^', '','$1ॅ'],
 27+['([क-ह]़?)्e', '','$1े'],
 28+['([क-ह]़?)्E', '','$1े'],
 29+['([क-ह]़?)ॊ\\^', '','$1ॉ'],
 30+['([क-ह]़?)i', '','$1ै'],
 31+['([क-ह]़?)्o', '','$1ो'],
 32+['([क-ह]़?)्O', '','$1ो'],
 33+['([क-ह]़?)u', '','$1ौ'],
 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+['([क-ह])्\\`', '','$1़्'],
 47+
 48+['अa', '','आ'],
 49+['(ऒo|उu)', '','ऊ'],
 50+['ऎ\\^', '','ऍ'],
 51+['अi', '','ऐ'],
 52+['अ\\^', '','ॲ'],
 53+['(इi|ऎe)', '','ई'],
 54+['ऒ\\^', '','ऑ'],
 55+['अu', '','औ'],
 56+['ऋR', '','ॠ'],
 57+['ळ्l', '','ऌ'],
 58+['ऌl', '','ॡ'],
 59+['ं\\^', '','ँ'],
 60+['ंm', '','ँ'],
 61+['ंM', '','ँ'],
 62+['ओM', '','ॐ'],
 63+
 64+['क्h', '','ख्'],
 65+['ग्h', '','घ्'],
 66+['न्g', '','ङ्'],
 67+['च्h', '','छ्'],
 68+['ज्h', '','झ्'],
 69+['न्j', '','ञ्'],
 70+['ट्h', '','ठ्'],
 71+['ड्h', '','ढ्'],
 72+['त्h', '','थ्'],
 73+['द्h', '','ध्'],
 74+['प्h', '','फ्'],
 75+['ब्h', '','भ्'],
 76+['ऋa', '','ऱ'],
 77+['ऋA', '','ऱा'],
 78+['ऋi', '','ऱि'],
 79+['ऋI', '','ऱी'],
 80+['ऋu', '','ऱु'],
 81+['ऋU', '','ऱू'],
 82+['ऋ\\^', '','ऱॅ'],
 83+['ऋe', '','ऱे'],
 84+['ऋE', '','ऱे'],
 85+['ऋo', '','ऱो'],
 86+['ऋO', '','ऱो'],
 87+['ऋ\\~', '','ऱ्'],
 88+
 89+['स्h', '','श्'],
 90+['श्h', '','ष्'],
 91+['क़्h', '','ख़्'],
 92+['ज़्h', '','ऴ्'],
 93+['।\\.', '','॥'],
 94+
 95+['a', '','अ'],
 96+['b', '','ब्'],
 97+['c', '','च्'],
 98+['d', '','द्'],
 99+['e', '','ए'],
 100+['f', '','फ्'],
 101+['F', '','फ़्'],
 102+['g', '','ग्'],
 103+['h', '','ह्'],
 104+['i', '','इ'],
 105+['j', '','ज्'],
 106+['j', '','ज़्'],
 107+['k', '','क्'],
 108+['l', '','ल्'],
 109+['m', '','म्'],
 110+['n', '','न्'],
 111+['o', '','ओ'],
 112+['p', '','प्'],
 113+['q', '','\u0951'],
 114+['r', '','र्'],
 115+['s', '','स्'],
 116+['t', '','त्'],
 117+['u', '','उ'],
 118+['(v|w)', '','व्'],
 119+['x', '','क्ष्'],
 120+['y', '','य्'],
 121+['(z|Z)', '','.'],
 122+['A', '','आ'],
 123+['B', '','ब्ब्'],
 124+['C', '','क्क्'],
 125+['D', '','ड्'],
 126+['E', '','ऍ'],
 127+//'F', '','फ्'],
 128+['G', '','ग्ग्'],
 129+['H', '','ः'],
 130+['I', '','ई'],
 131+['J', '','ज्ज्'],
 132+['K', '','क्क्'],
 133+['L', '','ळ्'],
 134+['M', '','ं'],
 135+['N', '','ण्'],
 136+['O', '','ओ'],
 137+['P', '','प्प्'],
 138+//'Q', '','अ'],
 139+['R', '','ऋ'],
 140+['S', '','श्'],
 141+['T', '','ट्'],
 142+['U', '','ऊ'],
 143+['(V|W)', '','व्व्'],
 144+['X', '','क्ष्'],
 145+['Y', '','ञ्'],
 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+];
 162+
 163+jQuery.narayam.addScheme( 'hi', {
 164+ 'namemsg': 'narayam-hi',
 165+ 'extended_keyboard': false,
 166+ 'lookbackLength': 3,
 167+ 'keyBufferLength': 1,
 168+ 'rules': rules
 169+} );
Index: trunk/extensions/Narayam/Narayam.php
@@ -65,6 +65,7 @@
6666 'eo' => 'ext.narayam.rules.eo',
6767 ),
6868 'hi' => array(
 69+ 'hi' => 'ext.narayam.rules.hi',
6970 'hi-inscript' => 'ext.narayam.rules.hi-inscript',
7071 ),
7172 'kn' => array(
@@ -160,6 +161,7 @@
161162 'narayam-as-bornona',
162163 'narayam-as-inscript',
163164 'narayam-eo',
 165+ 'narayam-hi',
164166 'narayam-hi-inscript',
165167 'narayam-kn',
166168 'narayam-kn-inscript',
@@ -228,6 +230,10 @@
229231 'scripts' => 'js/ext.narayam.rules.eo.js',
230232 'dependencies' => 'ext.narayam.core',
231233 );
 234+$wgResourceModules['ext.narayam.rules.hi'] = $narayamTpl + array(
 235+ 'scripts' => 'js/ext.narayam.rules.hi.js',
 236+ 'dependencies' => 'ext.narayam.core',
 237+);
232238 $wgResourceModules['ext.narayam.rules.hi-inscript'] = $narayamTpl + array(
233239 'scripts' => 'js/ext.narayam.rules.hi-inscript.js',
234240 'dependencies' => 'ext.narayam.core',

Follow-up revisions

RevisionCommit summaryAuthorDate
r105852Correct the date of the file. minor....santhosh06:06, 12 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   12:12, 7 December 2011

Really?

+ * @date 2011-02-26
#Comment by Santhosh.thottingal (talk | contribs)   06:07, 12 December 2011

date corrected in r105852

Status & tagging log