Index: trunk/extensions/Narayam/Narayam.i18n.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | 'narayam-ne-inscript' => 'Nepali InScript', |
44 | 44 | 'narayam-or' => 'Oriya Transliteration', |
45 | 45 | 'narayam-or-inscript' => 'Oriya InScript', |
| 46 | + 'narayam-pa-phonetic' => 'Gurmukhi Punjabi Phonetic', |
46 | 47 | 'narayam-pa-inscript' => 'Gurmukhi Punjabi InScript', |
47 | 48 | 'narayam-sa' => 'Sanskrit Transliteration', |
48 | 49 | 'narayam-sa-inscript' => 'Sanskrit InScript', |
Index: trunk/extensions/Narayam/js/ext.narayam.rules.pa-phonetic.js |
— | — | @@ -0,0 +1,99 @@ |
| 2 | +/** |
| 3 | + * Phonetic keyboard regular expression rules table for Punjabi |
| 4 | + * @date 2011-11-19 |
| 5 | + * Based on http://fedoraproject.org/wiki/I18N/Indic/PunjabiKeyboardLayouts |
| 6 | + */ |
| 7 | + |
| 8 | + // Normal rules |
| 9 | +var rules = [ |
| 10 | + ['!', '','੧'], |
| 11 | + ['1', '','1'], |
| 12 | + ['@', '','੨'], |
| 13 | + ['2', '','2'], |
| 14 | + ['#', '','੩'], |
| 15 | + ['3', '','3'], |
| 16 | + ['\\$', '','੪'], |
| 17 | + ['4', '','4'], |
| 18 | + ['5', '','5'], |
| 19 | + ['6', '','6'], |
| 20 | + ['7', '','7'], |
| 21 | + ['8', '','8'], |
| 22 | + ['\\)', '','੯'], |
| 23 | + ['9', '','9'], |
| 24 | + ['\\),', '','੦'], |
| 25 | + ['0', '','0'], |
| 26 | + ['Q', '','ਥ'], |
| 27 | + ['q', '','ਤ'], |
| 28 | + ['w', '','ਾ'], |
| 29 | + ['E', '','ਓ'], |
| 30 | + ['e', '','ੲ'], |
| 31 | + ['r', '','ਰ'], |
| 32 | + ['T', '','ਠ'], |
| 33 | + ['t', '','ਟ'], |
| 34 | + ['Y', '','ੈ'], |
| 35 | + ['y', '','ੇ'], |
| 36 | + ['U', '','ੂ'], |
| 37 | + ['u', '','ੁ'], |
| 38 | + ['I', '','ੀ'], |
| 39 | + ['i', '','ਿ'], |
| 40 | + ['O', '','ੌ'], |
| 41 | + ['o', '','ੋ'], |
| 42 | + ['P', '','ਫ'], |
| 43 | + ['p', '','ਪ'], |
| 44 | + ['\\{', '','('], |
| 45 | + ['\\}', '',')'], |
| 46 | + ['A', '','ਅ'], |
| 47 | + ['a', '','ੳ'], |
| 48 | + ['S', '','ਸ਼'], |
| 49 | + ['s', '','ਸ'], |
| 50 | + ['D', '','ਧ'], |
| 51 | + ['d', '','ਦ'], |
| 52 | + ['F', '','ਢ'], |
| 53 | + ['f', '','ਡ'], |
| 54 | + ['G', '','ਘ'], |
| 55 | + ['g', '','ਗ'], |
| 56 | + ['h', '','ਹ'], |
| 57 | + ['J', '','ਝ'], |
| 58 | + ['j', '','ਜ'], |
| 59 | + ['K', '','ਖ'], |
| 60 | + ['k', '','ਕ'], |
| 61 | + ['L', '','ਲ਼'], |
| 62 | + ['l', '','ਲ'], |
| 63 | + ['\\', '','ਙ'], |
| 64 | + ['\\~', '','?ੱ'], |
| 65 | + ['\\`', '','?੍ '], |
| 66 | + ['Z', '','ਗ਼'], |
| 67 | + ['z', '','ਜ਼'], |
| 68 | + ['X', '','ਯ'], |
| 69 | + ['x', '','ਣ'], |
| 70 | + ['C', '','ਛ'], |
| 71 | + ['c', '','ਚ'], |
| 72 | + ['V', '','ੜ'], |
| 73 | + ['v', '','ਵ'], |
| 74 | + ['B', '','ਭ'], |
| 75 | + ['b', '','ਬ'], |
| 76 | + ['N', '','ਂ'], |
| 77 | + ['n', '','ਨ'], |
| 78 | + ['M', '','ੰ'], |
| 79 | + ['m', '','ਮ'], |
| 80 | + ['\\<', '','ਖ਼'], |
| 81 | + ['\\>', '','ੴ'], |
| 82 | + ['\\.', '','?਼'], |
| 83 | + ['\\?', '','?'], |
| 84 | + ['\\/', '','ਞ'], |
| 85 | + ['%', '','੫'], |
| 86 | + ['\\^', '','੬'], |
| 87 | + ['&', '','੭'], |
| 88 | + ['*', '','੮'], |
| 89 | + ['R', '','੍ਰ'], |
| 90 | + ['H', '','੍ਹ'], |
| 91 | + ['W', '','ਾਂ'] |
| 92 | +]; |
| 93 | + |
| 94 | +jQuery.narayam.addScheme( 'pa-phonetic', { |
| 95 | + 'namemsg': 'narayam-pa-phonetic', |
| 96 | + 'extended_keyboard': true, |
| 97 | + 'lookbackLength': 0, |
| 98 | + 'keyBufferLength': 0, |
| 99 | + 'rules': rules |
| 100 | +} ); |
Index: trunk/extensions/Narayam/Narayam.php |
— | — | @@ -96,6 +96,7 @@ |
97 | 97 | ), |
98 | 98 | 'pa' => array( |
99 | 99 | 'pa-inscript' => 'ext.narayam.rules.pa-inscript', |
| 100 | + 'pa-phonetic' => 'ext.narayam.rules.pa-phonetic', |
100 | 101 | ), |
101 | 102 | 'sa' => array( |
102 | 103 | 'sa' => 'ext.narayam.rules.sa', |
— | — | @@ -182,6 +183,7 @@ |
183 | 184 | 'narayam-or', |
184 | 185 | 'narayam-or-inscript', |
185 | 186 | 'narayam-pa-inscript', |
| 187 | + 'narayam-pa-phonetic', |
186 | 188 | 'narayam-sa', |
187 | 189 | 'narayam-sa-inscript', |
188 | 190 | 'narayam-si-singlish', |
— | — | @@ -298,6 +300,10 @@ |
299 | 301 | 'scripts' => 'js/ext.narayam.rules.pa-inscript.js', |
300 | 302 | 'dependencies' => 'ext.narayam.core', |
301 | 303 | ); |
| 304 | +$wgResourceModules['ext.narayam.rules.pa-phonetic'] = $narayamTpl + array( |
| 305 | + 'scripts' => 'js/ext.narayam.rules.pa-phonetic.js', |
| 306 | + 'dependencies' => 'ext.narayam.core', |
| 307 | +); |
302 | 308 | $wgResourceModules['ext.narayam.rules.sa'] = $narayamTpl + array( |
303 | 309 | 'scripts' => 'js/ext.narayam.rules.sa.js', |
304 | 310 | 'dependencies' => 'ext.narayam.core', |