r104577 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104576‎ | r104577 | r104578 >
Date:18:05, 29 November 2011
Author:amire80
Status:resolved (Comments)
Tags:
Comment:
Adding Tamil InScript mapping.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/resources/ext.narayam.rules.ta-inscript.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/resources/ext.narayam.rules.ta-inscript.js
@@ -0,0 +1,74 @@
 2+/**
 3+ * InScript regular expression rules table for Tamil
 4+ * @author Amir E. Aharoni ([[User:Amire80]])
 5+ * based on the Malayalam map by
 6+ * @author Junaid P V ([[User:Junaidpv]])
 7+ * and Fedora Tamil keyboard layout:
 8+ * http://fedoraproject.org/wiki/I18N/Indic/TamilKeyboardLayouts
 9+ * @date 2011-11-29
 10+ * License: GPLv3
 11+ */
 12+var rules = [
 13+['`', '', 'ொ'],
 14+['~', '', 'ஒ'],
 15+
 16+['&', '', 'க்ஷ்'],
 17+['\\*', '', 'ஷ்ர'],
 18+
 19+['_', '', 'ஃ'],
 20+
 21+['q', '', 'ௌ'],
 22+['Q', '', 'ஔ'],
 23+['w', '', 'ை'],
 24+['W', '', 'ஐ'],
 25+['e', '', 'ா'],
 26+['E', '', 'ஆ'],
 27+['r', '', 'ீ'],
 28+['R', '', 'ஈ'],
 29+['t', '', 'ூ'],
 30+['T', '', 'ஊ'],
 31+['u', '', 'ஹ'],
 32+['U', '', 'ங'],
 33+['p', '', 'ஜ'],
 34+['\\}', '', 'ஞ்'],
 35+
 36+['a', '', 'ோ'],
 37+['A', '', 'ஓ'],
 38+['s', '', 'ே'],
 39+['S', '', 'ஏ'],
 40+['d', '', '்'],
 41+['D', '', 'அ'],
 42+['f', '', 'ி'],
 43+['F', '', 'இ'],
 44+['g', '', 'ு'],
 45+['G', '', 'உ'],
 46+['h', '', 'ப'],
 47+['j', '', 'ர'],
 48+['J', '', 'ற'],
 49+['k', '', 'க'],
 50+['l', '', 'த'],
 51+[';', '', 'ச'],
 52+['\'', '', 'ட'],
 53+
 54+['z', '', 'ெ'],
 55+['Z', '', 'எ'],
 56+['c', '', 'ம'],
 57+['C', '', 'ண'],
 58+['v', '', 'ந'],
 59+['V', '', 'ன'],
 60+['b', '', 'வ'],
 61+['B', '', 'ழ'],
 62+['n', '', 'ல'],
 63+['N', '', 'ள'],
 64+['m', '', 'ஸ'],
 65+['<', '', 'ஷ'],
 66+['/', '', 'ய']
 67+];
 68+
 69+jQuery.narayam.addScheme( 'ta-inscript', {
 70+ 'namemsg': 'narayam-ta-inscript',
 71+ 'extended_keyboard': false,
 72+ 'lookbackLength': 2,
 73+ 'keyBufferLength': 0,
 74+ 'rules': rules
 75+} );
Property changes on: trunk/extensions/Narayam/resources/ext.narayam.rules.ta-inscript.js
___________________________________________________________________
Added: svn:eol-style
176 + native
Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -51,6 +51,7 @@
5252 'narayam-si-singlish' => 'Sinhala Singlish',
5353 'narayam-si-wijesekara' => 'Sinhala Wijesekara',
5454 'narayam-ta-99' => 'Tamil99',
 55+ 'narayam-ta-inscript' => 'Tamil InScript',
5556 'narayam-ta' => 'Tamil Transliteration',
5657 'narayam-ta-bamini' => 'Tamil Bamini',
5758 'narayam-te-inscript' => 'Telugu InScript',
Index: trunk/extensions/Narayam/Narayam.php
@@ -121,6 +121,7 @@
122122 'ta' => 'ext.narayam.rules.ta',
123123 'ta-99' => 'ext.narayam.rules.ta-99',
124124 'ta-bamini' => 'ext.narayam.rules.ta-bamini',
 125+ 'ta-inscript' => 'ext.narayam.rules.ta-inscript',
125126 ),
126127 'te' => array(
127128 'te-inscript' => 'ext.narayam.rules.te-inscript',
@@ -209,6 +210,7 @@
210211 'narayam-si-singlish',
211212 'narayam-si-wijesekara',
212213 'narayam-ta-99',
 214+ 'narayam-ta-inscript',
213215 'narayam-ta',
214216 'narayam-ta-bamini',
215217 'narayam-te-inscript',
@@ -359,6 +361,10 @@
360362 'scripts' => 'resources/ext.narayam.rules.ta-99.js',
361363 'dependencies' => 'ext.narayam.core',
362364 );
 365+$wgResourceModules['ext.narayam.rules.ta-inscript'] = $narayamTpl + array(
 366+ 'scripts' => 'resources/ext.narayam.rules.ta-inscript.js',
 367+ 'dependencies' => 'ext.narayam.core',
 368+);
363369 $wgResourceModules['ext.narayam.rules.ta-bamini'] = $narayamTpl + array(
364370 'scripts' => 'resources/ext.narayam.rules.ta-bamini.js',
365371 'dependencies' => 'ext.narayam.core',

Follow-up revisions

RevisionCommit summaryAuthorDate
r104594Followup to r104577, adding characters according to the standard.amire8021:16, 29 November 2011
r105462Followup to r104577, fixes according to Santhosh's comments.amire8021:39, 7 December 2011

Comments

#Comment by Santhosh.thottingal (talk | contribs)   06:47, 30 November 2011
+	'lookbackLength': 2,

I don't think we need 2 here. Since it is one to one keymapping, lookbackLength = 0 is enough.

#Comment by Amire80 (talk | contribs)   06:50, 30 November 2011

I copied it from ml-inscript, so maybe it's not needed there either.

#Comment by Santhosh.thottingal (talk | contribs)   11:02, 7 December 2011

In Malayalam it is required since there is a rule: ['ര്\\]', , 'ർ'], which required lookbacklength 2.

#Comment by Santhosh.thottingal (talk | contribs)   11:13, 7 December 2011

['\\}', , 'ஞ்'], is wrong. It is ['\\}', , 'ஞ'],

#Comment by Amire80 (talk | contribs)   09:09, 8 December 2011

Fixed in r105462.

Status & tagging log