r103748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103747‎ | r103748 | r103749 >
Date:11:14, 20 November 2011
Author:junaidpv
Status:ok (Comments)
Tags:
Comment:
Narayam: Lekhani, a new scheme for Odiya with help from Subashish.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/js/ext.narayam.rules.or-lekhani.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -40,7 +40,8 @@
4141 'narayam-mr-inscript' => 'Marathi InScript',
4242 'narayam-ne' => 'Nepali Transliteration',
4343 'narayam-ne-inscript' => 'Nepali InScript',
44 - 'narayam-or' => 'Oriya Transliteration',
 44+ 'narayam-or' => 'Odiya Transliteration',
 45+ 'narayam-or-lekhani' => 'Odiya Lekhani',
4546 'narayam-or-inscript' => 'Oriya InScript',
4647 'narayam-pa-phonetic' => 'Gurmukhi Punjabi Phonetic',
4748 'narayam-pa-inscript' => 'Gurmukhi Punjabi InScript',
Index: trunk/extensions/Narayam/js/ext.narayam.rules.or-lekhani.js
@@ -0,0 +1,155 @@
 2+/**
 3+ * Lekhani regular expression rules table for Oriya
 4+ * @author Junaid P V ([[user:Junaidpv]])
 5+ * @date 2011-11-20
 6+ * @credit With help from Subhashish Panigrahi
 7+ * License: GPLv3
 8+ */
 9+// Normal rules
 10+var rules = [
 11+['\\\\([A-Za-z\\>_~\\.0-9])', '\\\\','$1'],
 12+
 13+['([କ-ହୟୱ])a', '','$1ା'],
 14+['([କ-ହୟୱ])i', '','$1\u0b3f'],
 15+['([କ-ହୟୱ])I', '','$1ୀ'],
 16+['([କ-ହୟୱ])u', '','$1\u0b41'],
 17+['([କ-ହୟୱ])(U|\u0b41u)', '','$1\u0b42'],
 18+['([କ-ହୟୱ])R', '','$1\u0b43'],
 19+['([କ-ହୟୱ])\u0b43R', '','$1\u0b44'],
 20+['([କ-ହୟୱ])୍ଳ୍l', '','$1ୢ'],
 21+['([କ-ହୟୱ])ୢl', '','$1ୣ'],
 22+['([କ-ହୟୱ])e', '','$1େ'],
 23+['([କ-ହୟୱ])ାi', '','$1ୈ'],
 24+['([କ-ହୟୱ])o', '','$1ୋ'],
 25+['([କ-ହୟୱ])(ାu|ୋu)', '','$1ୌ'],
 26+['([କ-ହୟୱ])E', '','$1\u0B48'],
 27+
 28+['([କ-ହୟୱ])y', '', '$1୍ୟ'], // <consonant>y
 29+
 30+['ଅa', '','ଆ'],
 31+['(ଅi|ଏe)', '','ଐ'],
 32+['(ଅu|ଓo|ଓO)', '','ଔ'],
 33+['ଋR', '','ୠ'], // RR
 34+['ଳl', '','ଌ'], // Ll
 35+['ଌl', '','ୡ'], // Lll
 36+['ଞ୍ଚh', '', 'ଞ୍ଛ'], // nch
 37+['ଞ୍ଜh', '', 'ଞ୍ଝ'], // njh
 38+['ଙ୍କh', '', 'ଙ୍ଖ'], // nkh
 39+['ଙ୍ଗh', '', 'ଙ୍ଘ'], // ngh
 40+['ମ୍ବh', '', 'ମ୍ଭ'], // mbh or nbh
 41+['ଜ୍ଜh', '', 'ଜ୍ଝ'], // jjh
 42+
 43+['ଚ୍ଚh', '', 'ଚ୍ଛ'], // cch
 44+
 45+['ଣG', '', 'ଙ'], // NG
 46+['ଣg', '', 'ଞ'], // Ng
 47+['କh', '','ଖ'], // kh
 48+['ଗh', '','ଘ'], // gh
 49+['ନc', '', 'ଞ୍ଚ'], // nc
 50+['ନg', '', 'ଙ୍ଗ'], // ng
 51+['ଚh', '','ଛ'], // ch
 52+['ଜh', '','ଝ'], // jh
 53+['ନj', '', 'ଞ୍ଜ'], // nj
 54+['ନk', '', 'ଙ୍କ'], // nk
 55+['ଟh', '','ଠ'], // Th
 56+['ଡh', '','ଢ'], // Dh
 57+['ତh', '','ଥ'], // th
 58+['ଦh', '','ଧ'], // dh
 59+['(f|ପh)', '','ଫ'], // ph or f
 60+['ବh', '','ଭ'], // bh
 61+['ସh', '','ଷ'], // sh
 62+['(ମb|ନb)', '', 'ମ୍ବ'], // mb or nb
 63+['ଂM', '', 'ଁ'], // MM
 64+
 65+['କk', '', 'କ୍କ'], // kk
 66+['ଗg', '', 'ଗ୍ଗ'], // gg
 67+['ଚc', '', 'ଚ୍ଚ'], // cc
 68+['ଜj', '', 'ଜ୍ଜ'], // jj
 69+['ଟT', '', 'ଟ୍ଟ'], // TT
 70+['ଡD', '', 'ଡ୍ଡ'], // DD
 71+['ତt', '', 'ତ୍ତ'], // tt
 72+
 73+
 74+['ଆ\\\\', '', '\u0B3E'], // aa sign
 75+['ଇ\\\\', '', '\u0B3F'], // i sign
 76+['ଈ\\\\', '', '\u0B40'],// I sign
 77+['ଉ\\\\', '', '\u0B41'], // u sign
 78+['ଉ\\\\', '', '\u0B42'], // U sign
 79+['ଋ\\\\', '', '\u0B43'], // R sign
 80+['ୠ\\\\', '', '\u0B44'], // RR sign
 81+['ଌ\\\\', '', '\u0B62'], // L sign
 82+['ୡ\\\\', '', '\u0B63'], // LL sign
 83+['ଏ\\\\', '', '\u0B47'], // e sign
 84+['ଐ\\\\', '', '\u0B48'], // ai sign
 85+['ଓ\\\\', '', '\u0B4B'], // o sign
 86+['ଔ\\\\', '', '\u0B4C'], // au sign
 87+
 88+['\u200c?a', '','ଅ'],
 89+['b', '','ବ'],
 90+['c','','ଚ'],
 91+['d', '','ଦ'],
 92+['\u200c?e', '','ଏ'],
 93+['g', '','ଗ'],
 94+['h', '','ହ'],
 95+['\u200c?i', '','ଇ'],
 96+['j', '','ଜ'],
 97+['k', '','କ'],
 98+['l', '','ଲ'],
 99+['m', '','ମ'],
 100+['n', '','ନ'],
 101+['\u200c?o', '','ଓ'],
 102+['p', '','ପ'],
 103+['q', '', 'ଡ଼'],
 104+['r', '','ର'],
 105+['s', '','ସ'],
 106+['t', '','ତ'],
 107+['\u200c?u', '','ଉ'],
 108+['[vwVW]', '', 'ୱ'],
 109+['x', '','କ୍ଷ'],
 110+['[yY]', '', 'ୟ'],
 111+['z', '','\u0B3C'],
 112+['\u200c?A', '','ଆ'],
 113+['B', '','ବ'],
 114+['C', '','ଛ'],
 115+['D', '','ଡ'],
 116+['\u200c?E', '','ଐ'],
 117+['F', '','ଫ'],
 118+['G', '','ଗ'],
 119+['H', '','ଃ'],
 120+['\u200c?I', '','ଈ'],
 121+['J', '','ଯ'],
 122+['K', '','କ୍କ'],
 123+['L', '','ଳ'],
 124+['M', '','ଂ'],
 125+['N', '','ଣ'],
 126+['\u200c?O', '', 'ଔ'],
 127+['P', '','ପ୍ପ'],
 128+['Q', '', 'ଢ଼'],
 129+['R', '','ଋ'],
 130+['S', '','ଶ'],
 131+['T', '','ଟ'],
 132+['\u200c?U', '','ଊ'],
 133+['X', '', 'ଁ'],
 134+['Z', '', 'ଜ୍ଞ'],
 135+['\\~', '','୍'],
 136+['//', '','ଽ'],
 137+['_', '', '\u200c'],
 138+['0', '','୦'],
 139+['1', '','୧'],
 140+['2', '','୨'],
 141+['3', '','୩'],
 142+['4', '','୪'],
 143+['5', '','୫'],
 144+['6', '','୬'],
 145+['7', '','୭'],
 146+['8', '','୮'],
 147+['9', '','୯']
 148+];
 149+
 150+jQuery.narayam.addScheme( 'or-lekhani', {
 151+ 'namemsg': 'narayam-or-lekhani',
 152+ 'extended_keyboard': false,
 153+ 'lookbackLength': 4,
 154+ 'keyBufferLength': 2,
 155+ 'rules': rules
 156+} );
Property changes on: trunk/extensions/Narayam/js/ext.narayam.rules.or-lekhani.js
___________________________________________________________________
Added: svn:eol-style
1157 + native
Index: trunk/extensions/Narayam/Narayam.php
@@ -92,6 +92,7 @@
9393 ),
9494 'or' => array(
9595 'or' => 'ext.narayam.rules.or',
 96+ 'or-lekhani' => 'ext.narayam.rules.or-lekhani',
9697 'or-inscript' => 'ext.narayam.rules.or-inscript',
9798 ),
9899 'pa' => array(
@@ -181,6 +182,7 @@
182183 'narayam-ne',
183184 'narayam-ne-inscript',
184185 'narayam-or',
 186+ 'narayam-or-lekhani',
185187 'narayam-or-inscript',
186188 'narayam-pa-inscript',
187189 'narayam-pa-phonetic',
@@ -292,6 +294,10 @@
293295 'scripts' => 'js/ext.narayam.rules.or.js',
294296 'dependencies' => 'ext.narayam.core',
295297 );
 298+$wgResourceModules['ext.narayam.rules.or-lekhani'] = $narayamTpl + array(
 299+ 'scripts' => 'js/ext.narayam.rules.or-lekhani.js',
 300+ 'dependencies' => 'ext.narayam.core',
 301+);
296302 $wgResourceModules['ext.narayam.rules.or-inscript'] = $narayamTpl + array(
297303 'scripts' => 'js/ext.narayam.rules.or-inscript.js',
298304 'dependencies' => 'ext.narayam.core',

Sign-offs

UserFlagDate
Nikerabbitinspected11:59, 7 December 2011

Comments

#Comment by Santhosh.thottingal (talk | contribs)   04:33, 6 December 2011

Odia is the correct spelling, not Odiya. See http://en.wikipedia.org/wiki/Odiya and http://en.wikipedia.org/wiki/Oriya_language

Do we have documentation or specification for this scheme?

#Comment by Siebrand (talk | contribs)   08:38, 19 December 2011

We're deploying today, and I see this mapping does not have a beta tag. Should it have a beta tag, otherwise it'll be availabe in "or" projects in about 9.5 hours from now (or actually in all projects on Wikimedia that have Narayam enabled).

#Comment by Santhosh.thottingal (talk | contribs)   08:42, 19 December 2011

Lekhini is beta tagged. so it wont apprear in wikimedia wikis.

#Comment by Santhosh.thottingal (talk | contribs)   08:31, 5 January 2012

I am marking the revision ok, but if we don't have a clear idea about the transliteration scheme, instead of keeping it in beta forever, better remove. I am not sure if it is complete. If so let us know.

Status & tagging log