r104156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104155‎ | r104156 | r104157 >
Date:11:05, 24 November 2011
Author:amire80
Status:resolved (Comments)
Tags:
Comment:
Adding Cyrillic Sakha keyboard.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/resources/ext.narayam.rules.ru-standard.js (modified) (history)
  • /trunk/extensions/Narayam/resources/ext.narayam.rules.sah-standard.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/resources/ext.narayam.rules.ru-standard.js
@@ -78,7 +78,7 @@
7979 ['`', '', 'ё'],
8080 ['~', '', 'Ё'],
8181
82 -['!', '', '!'], // 1
 82+// ! is the same // 1
8383 ['@', '', '"'], // 2
8484 ['#', '', '№'], // 3
8585 ['\\$', '', ';'], // 4
@@ -88,7 +88,6 @@
8989 // '*', '(' and ')' are the same // 8, 9, 0
9090 ];
9191
92 -
9392 jQuery.narayam.addScheme( 'ru-standard', {
9493 'namemsg': 'narayam-ru-standard',
9594 'extended_keyboard': false,
Index: trunk/extensions/Narayam/resources/ext.narayam.rules.sah-standard.js
@@ -0,0 +1,104 @@
 2+/**
 3+ * Transliteration rules table for standard Sakha keyboard
 4+ * @author Amir (Алексей) Aharoni ([[User:Amire80]])
 5+ * @date 2011-11-21
 6+ * License: GPLv3, CC-BY-SA 3.0
 7+ */
 8+
 9+ // Normal rules
 10+var rules = [
 11+['Q', '', 'Й'],
 12+['W', '', 'Ц'],
 13+['E', '', 'У'],
 14+['R', '', 'К'],
 15+['T', '', 'Е'],
 16+['Y', '', 'Н'],
 17+['U', '', 'Г'],
 18+['I', '', 'Ш'],
 19+['O', '', 'Щ'],
 20+['P', '', 'З'],
 21+['{', '', 'Х'],
 22+['}', '', 'Ъ'],
 23+['A', '', 'Ф'],
 24+['S', '', 'Ы'],
 25+['D', '', 'В'],
 26+['F', '', 'А'],
 27+['G', '', 'П'],
 28+['H', '', 'Р'],
 29+['J', '', 'О'],
 30+['K', '', 'Л'],
 31+['L', '', 'Д'],
 32+[':', '', 'Ж'],
 33+['"', '', 'Э'],
 34+['Z', '', 'Я'],
 35+['X', '', 'Ч'],
 36+['C', '', 'С'],
 37+['V', '', 'М'],
 38+['B', '', 'И'],
 39+['N', '', 'Т'],
 40+['M', '', 'Ь'],
 41+['<', '', 'Б'],
 42+['>', '', 'Ю'],
 43+['\\?', '', ','],
 44+
 45+['q', '', 'й'],
 46+['w', '', 'ц'],
 47+['e', '', 'у'],
 48+['r', '', 'к'],
 49+['t', '', 'е'],
 50+['y', '', 'н'],
 51+['u', '', 'г'],
 52+['i', '', 'ш'],
 53+['o', '', 'щ'],
 54+['p', '', 'з'],
 55+['\\[', '', 'х'],
 56+['\\]', '', 'ъ'],
 57+['a', '', 'ф'],
 58+['s', '', 'ы'],
 59+['d', '', 'в'],
 60+['f', '', 'а'],
 61+['g', '', 'п'],
 62+['h', '', 'р'],
 63+['j', '', 'о'],
 64+['k', '', 'л'],
 65+['l', '', 'д'],
 66+[';', '', 'ж'],
 67+['\'', '', 'э'],
 68+['z', '', 'я'],
 69+['x', '', 'ч'],
 70+['c', '', 'с'],
 71+['v', '', 'м'],
 72+['b', '', 'и'],
 73+['n', '', 'т'],
 74+['m', '', 'ь'],
 75+[',', '', 'б'],
 76+['\\.', '', 'ю'],
 77+['/', '', '.'],
 78+
 79+['`', '', '"'],
 80+['~', '', '№'],
 81+
 82+['1', '', '!'], // 1
 83+['!', '', '?'], // 1
 84+// 2, 3 - ?
 85+['4', '', 'ҥ'], // 4
 86+['\\$', '', 'Ҥ'], // 4
 87+['5', '', 'ҕ'], // 5
 88+['#', '', 'Ҕ'], // 5
 89+['6', '', 'ө'], // 6
 90+['\\^', '', 'Ө'], // 6
 91+['7', '', 'һ'], // 7
 92+['&', '', 'Һ'], // 7
 93+['8', '', 'ү'], // 8
 94+['\\*', '', 'Ү'], // 8
 95+['9', '', ';'], // 9
 96+['0', '', ':'], // 0
 97+];
 98+
 99+jQuery.narayam.addScheme( 'sah-standard', {
 100+ 'namemsg': 'narayam-sah-standard',
 101+ 'extended_keyboard': false,
 102+ 'lookbackLength': 0,
 103+ 'keyBufferLength': 0,
 104+ 'rules': rules
 105+} );
Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -62,6 +62,7 @@
6363 'narayam-gu' => 'Gujarati transliteration',
6464 'narayam-gu-inscript' => 'Gujarati InScript',
6565 'narayam-ru-standard' => 'Russian Standard',
 66+ 'narayam-sah-standard' => 'Sakha Standard',
6667 );
6768
6869 /** Message documentation (Message documentation)
Index: trunk/extensions/Narayam/Narayam.php
@@ -131,6 +131,9 @@
132132 'ru' => array(
133133 'ru-standard' => 'ext.narayam.rules.ru-standard',
134134 ),
 135+ 'sah' => array(
 136+ 'sah-standard' => 'ext.narayam.rules.sah-standard',
 137+ ),
135138 );
136139
137140 /* Setup */
@@ -212,6 +215,7 @@
213216 'narayam-gu',
214217 'narayam-gu-inscript',
215218 'narayam-ru-standard',
 219+ 'narayam-sah-standard',
216220 ),
217221 'dependencies' => array(
218222 'mediawiki.util',
@@ -375,3 +379,7 @@
376380 'scripts' => 'resources/ext.narayam.rules.ru-standard.js',
377381 'dependencies' => 'ext.narayam.core',
378382 );
 383+$wgResourceModules['ext.narayam.rules.sah-standard'] = $narayamTpl + array(
 384+ 'scripts' => 'resources/ext.narayam.rules.sah-standard.js',
 385+ 'dependencies' => 'ext.narayam.core',
 386+);

Follow-up revisions

RevisionCommit summaryAuthorDate
r104157Fixed letter, date and trailing comma.amire8011:15, 24 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   11:09, 24 November 2011

I'm pretty sure you didn't start this three days ago :)

And mind the trailing comma!

Status & tagging log