r103736 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103735‎ | r103736 | r103737 >
Date:07:25, 20 November 2011
Author:junaidpv
Status:ok
Tags:
Comment:
Narayam: InScript keyboard implementation for Bodo.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/js/ext.narayam.rules.brx-inscript.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -28,6 +28,7 @@
2929 'narayam-as-avro' => 'Assamese Avro',
3030 'narayam-as-bornona' => 'Assamese Bornona',
3131 'narayam-as-inscript' => 'Assamese InScript',
 32+ 'narayam-brx-inscript' => 'Bodo InScript',
3233 'narayam-eo' => 'Esperanto',
3334 'narayam-hi' => 'Hindi Transliteration',
3435 'narayam-hi-inscript' => 'Hindi InScript',
Index: trunk/extensions/Narayam/js/ext.narayam.rules.brx-inscript.js
@@ -0,0 +1,115 @@
 2+/**
 3+ * InScript regular expression rules table for Devanagari script for Bodo
 4+ * According to CDAC's "Enhanced InScript Keyboard Layout 5.2"
 5+ * @author Junaid P V ([[user:Junaidpv]])
 6+ * @date 2011-11-20
 7+ * License: GPLv3
 8+ */
 9+
 10+ // Normal rules
 11+var rules = [
 12+['X', '', '\u0901'],
 13+['x', '', '\u0902'],
 14+['_', '', '\u0903'],
 15+['D', '', '\u0905'],
 16+['E', '', '\u0906'],
 17+['F', '', '\u0907'],
 18+['R', '', '\u0908'],
 19+['G', '', '\u0909'],
 20+['T', '', '\u090A'],
 21+['\\+', '', '\u090B'],
 22+['S', '', '\u090F'],
 23+['W', '', '\u0910'],
 24+['A', '', '\u0913'],
 25+['Q', '', '\u0914'],
 26+['k', '', '\u0915'],
 27+['K', '', '\u0916'],
 28+['i', '', '\u0917'],
 29+['I', '', '\u0918'],
 30+['U', '', '\u0919'],
 31+[';', '', '\u091A'],
 32+['\\:', '', '\u091B'],
 33+['p', '', '\u091C'],
 34+['P', '', '\u091D'],
 35+['\\}', '', '\u091E'],
 36+["'", '', '\u091F'],
 37+['"', '', '\u0920'],
 38+['\\[', '', '\u0921'],
 39+['\\{', '', '\u0922'],
 40+['C', '', '\u0923'],
 41+['l', '', '\u0924'],
 42+['L', '', '\u0925'],
 43+['o', '', '\u0926'],
 44+['O', '', '\u0927'],
 45+['v', '', '\u0928'],
 46+['h', '', '\u092A'],
 47+['H', '', '\u092B'],
 48+['y', '', '\u092C'],
 49+['Y', '', '\u092D'],
 50+['c', '', '\u092E'],
 51+['/', '', '\u092F'],
 52+['j', '', '\u0930'],
 53+['n', '', '\u0932'],
 54+['b', '', '\u0935'],
 55+['M', '', '\u0936'],
 56+['\\<', '', '\u0937'],
 57+['m', '', '\u0938'],
 58+['u', '', '\u0939'],
 59+['\\]', '', '\u093C'],
 60+['e', '', '\u093E'],
 61+['f', '', '\u093F'],
 62+['r', '', '\u0940'],
 63+['g', '', '\u0941'],
 64+['t', '', '\u0942'],
 65+['\\=', '', '\u0943'],
 66+['s', '', '\u0947'],
 67+['w', '', '\u0948'],
 68+['a', '', '\u094B'],
 69+['q', '', '\u094C'],
 70+['d', '', '\u094D'],
 71+['\\>', '', '\u0964'],
 72+['0', '', '\u0966'],
 73+['1', '', '\u0967'],
 74+['2', '', '\u0968'],
 75+['3', '', '\u0969'],
 76+['4', '', '\u096A'],
 77+['5', '', '\u096B'],
 78+['6', '', '\u096C'],
 79+['7', '', '\u096D'],
 80+['8', '', '\u096E'],
 81+['9', '', '\u096F'],
 82+['\\#', '', '\u094D\u0930'],
 83+['\\$', '', '\u0930\u094D'],
 84+['\\%', '', '\u091C\u094D\u091E'],
 85+['\\^', '', '\u0924\u094D\u0930'],
 86+['\\&', '', '\u0915\u094D\u0937'],
 87+['\\*', '', '\u0936\u094D\u0930'],
 88+['\\(', '', '\u200D'],
 89+['\\)', '', '\u200C']
 90+];
 91+
 92+var rules_x = [
 93+['F', '', '\u090C'],
 94+['N', '', '\u0933'],
 95+['\\>', '', '\u093D'],
 96+['\\=', '', '\u0944'],
 97+['X', '', '\u0950'],
 98+['e', '', '\u0951'],
 99+['d', '', '\u0952'],
 100+['\\+', '', '\u0960'],
 101+['R', '', '\u0961'],
 102+['f', '', '\u0962'],
 103+['r', '', '\u0963'],
 104+['\\.', '', '\u0965'],
 105+[',', '', '\u0970'],
 106+['\\$', '', '\u20B9']
 107+];
 108+
 109+jQuery.narayam.addScheme( 'brx-inscript', {
 110+ 'namemsg': 'narayam-brx-inscript',
 111+ 'extended_keyboard': true,
 112+ 'lookbackLength': 0,
 113+ 'keyBufferLength': 0,
 114+ 'rules': rules,
 115+ 'rules_x': rules_x
 116+} );
\ No newline at end of file
Index: trunk/extensions/Narayam/Narayam.php
@@ -61,6 +61,9 @@
6262 'bn-inscript' => 'ext.narayam.rules.bn-inscript',
6363 'bn-nkb' => 'ext.narayam.rules.bn-nkb',
6464 ),
 65+ 'brx' => array(
 66+ 'brx-inscript' => 'ext.narayam.rules.brx-inscript',
 67+ ),
6568 'eo' => array(
6669 'eo' => 'ext.narayam.rules.eo',
6770 ),
@@ -160,6 +163,7 @@
161164 'narayam-as-avro',
162165 'narayam-as-bornona',
163166 'narayam-as-inscript',
 167+ 'narayam-brx-inscript',
164168 'narayam-eo',
165169 'narayam-hi',
166170 'narayam-hi-inscript',
@@ -226,6 +230,10 @@
227231 'scripts' => 'js/ext.narayam.rules.bn-nkb.js',
228232 'dependencies' => 'ext.narayam.core',
229233 );
 234+$wgResourceModules['ext.narayam.rules.brx-inscript'] = $narayamTpl + array(
 235+ 'scripts' => 'js/ext.narayam.rules.brx-inscript.js',
 236+ 'dependencies' => 'ext.narayam.core',
 237+);
230238 $wgResourceModules['ext.narayam.rules.eo'] = $narayamTpl + array(
231239 'scripts' => 'js/ext.narayam.rules.eo.js',
232240 'dependencies' => 'ext.narayam.core',

Status & tagging log