Index: trunk/extensions/Narayam/resources/ext.narayam.rules.te.js |
— | — | @@ -0,0 +1,241 @@ |
| 2 | +/** |
| 3 | + * Trasliteration regular expression rules table for Telugu |
| 4 | + * based on RTS |
| 5 | + * @author Veeven ([[user:Veeven]]) |
| 6 | + * @date 2012-01-23 |
| 7 | + * @credits Junaid, Naveen Shankar (because it is partly based on Sanskrit); |
| 8 | + * Nagarjuna Venna and others (because it mostly uses RTS) |
| 9 | + * License: GPLv3, CC-BY-SA 3.0 |
| 10 | + */ |
| 11 | + |
| 12 | + // Normal rules |
| 13 | +var rules = [ |
| 14 | +// handle sunna for n and m |
| 15 | +['(మ్|న్)b', '', 'ంబ్'], |
| 16 | +['(మ్|న్)B', '', 'ంభ్'], |
| 17 | +['(మ్|న్)c', '', 'ంచ్'], |
| 18 | +['(మ్|న్)C', '', 'ంఛ్'], |
| 19 | +['(మ్|న్)d', '', 'ంద్'], |
| 20 | +['(మ్|న్)D', '', 'ండ్'], |
| 21 | +['(మ్|న్)[fFP]', '', 'ంఫ్'], |
| 22 | +['(మ్|న్)g', '', 'ంగ్'], |
| 23 | +['(మ్|న్)h', '', 'ంహ్'], |
| 24 | +['(మ్|న్)j', '', 'ంజ్'], |
| 25 | +['(మ్|న్)J', '', 'ంఝ్'], |
| 26 | +['(మ్|న్)k', '', 'ంక్'], |
| 27 | +['(మ్|న్)L', '', 'ంళ్'], |
| 28 | +['(మ్|న్)p', '', 'ంప్'], |
| 29 | +['(మ్|న్)r', '', 'ంర్'], |
| 30 | +['(మ్|న్)s', '', 'ంస్'], |
| 31 | +['(మ్|న్)t', '', 'ంత్'], |
| 32 | +['(మ్|న్)T', '', 'ంట్'], |
| 33 | +['(మ్|న్)[vwVW]', '', 'ంవ్'], |
| 34 | +['(మ్|న్)[xX]', '', 'ంక్ష్'], |
| 35 | + |
| 36 | +// & for forcing combination |
| 37 | +['(మ్|న్)&b', '', '$1బ్'], |
| 38 | +['(మ్|న్)&B', '', '$1బ్'], |
| 39 | +['(మ్|న్)&c', '', '$1చ్'], |
| 40 | +['(మ్|న్)&C', '', '$1ఛ్'], |
| 41 | +['(మ్|న్)&d', '', '$1ద్'], |
| 42 | +['(మ్|న్)&D', '', '$1డ్'], |
| 43 | +['(మ్|న్)&[fFP]', '', '$1ఫ్'], |
| 44 | +['(మ్|న్)&g', '', '$1గ్'], |
| 45 | +['(మ్|న్)&h', '', '$1హ్'], |
| 46 | +['(మ్|న్)&j', '', '$1జ్'], |
| 47 | +['(మ్|న్)&J', '', '$1ఝ్'], |
| 48 | +['(మ్|న్)&k', '', '$1క్'], |
| 49 | +['(మ్|న్)&L', '', '$1ళ్'], |
| 50 | +['(మ్|న్)&p', '', '$1ప్'], |
| 51 | +['(మ్|న్)&r', '', '$1ర్'], |
| 52 | +['(మ్|న్)&s', '', '$1స్'], |
| 53 | +['(మ్|న్)&t', '', '$1త్'], |
| 54 | +['(మ్|న్)&T', '', '$1ట్'], |
| 55 | +['(మ్|న్)&[vwVW]', '', '$1వ్'], |
| 56 | +['(మ్|న్)&[xX]', '', '$1క్ష్'], |
| 57 | + |
| 58 | +['(మ్|న్)&(\\s|\\.|\\, |\\))', '', '$1$2'], |
| 59 | + |
| 60 | +// అ |
| 61 | +['([క-హ]|ౘ|ౙ)్a', '', '$1'], |
| 62 | + |
| 63 | +// ఆ |
| 64 | +['([క-హ])(్A|a|\')', '', '$1ా'], |
| 65 | + |
| 66 | +// ఇ |
| 67 | +['([క-హ])్i', '', '$1ి'], |
| 68 | + |
| 69 | +// ఈ |
| 70 | +['([క-హ])(్I|ిi|ి\'|ెe)', '', '$1ీ'], |
| 71 | + |
| 72 | +// ఉ |
| 73 | +['([క-హ])్u', '', '$1ు'], |
| 74 | + |
| 75 | + |
| 76 | +// ఊ |
| 77 | +['([క-హ])(ుu|ు\'|ుa|్U)', '', '$1ూ'], |
| 78 | +['([క-హ])ొo', 'o', '$1ూ'], |
| 79 | + |
| 80 | +// ఋ |
| 81 | +['([క-హ])్R', '', '$1ృ'], |
| 82 | +['([క-హ])్ర్\'', '', '$1ృ'], |
| 83 | + |
| 84 | +// ౠ |
| 85 | +['([క-హ])ృu', '', '$1ౄ'], |
| 86 | + |
| 87 | +// ఌ |
| 88 | +['([క-హ])్~l', '', '$1ౢ'], |
| 89 | + |
| 90 | +// ౡ |
| 91 | +['([క-హ])ౢ(l|\')', '', '$1ౣ'], |
| 92 | + |
| 93 | +// ఎ |
| 94 | +['([క-హ])్e', '', '$1ె'], |
| 95 | + |
| 96 | +// ఏ |
| 97 | +['([క-హ])(్E|ెa|ె\')', '', '$1ే'], |
| 98 | +['([క-హ])e', 'a', '$1ే'], |
| 99 | + |
| 100 | +// ఐ |
| 101 | +['([క-హ])ెi', '', '$1ై'], |
| 102 | +['([క-హ])i', 'a', '$1ై'], |
| 103 | + |
| 104 | +// ఒ |
| 105 | +['([క-హ])్o', '', '$1ొ'], |
| 106 | + |
| 107 | +// ఓ |
| 108 | +['([క-హ])(్O|ొa|ొ\')', '', '$1ో'], |
| 109 | + |
| 110 | +// ఔ |
| 111 | +['([క-హ])(ొu|ొw)', '', '$1ౌ'], |
| 112 | +['([క-హ])u', 'a', '$1ౌ'], |
| 113 | + |
| 114 | +// TODO: handle back corrections |
| 115 | +/* not working |
| 116 | +['([క-హ])u', '', '$1ు'], |
| 117 | +['([క-హ])U', '', '$1ూ'], |
| 118 | +['([క-హ])E', '', '$1ే'], |
| 119 | +*/ |
| 120 | + |
| 121 | +// zwnj |
| 122 | +['(్)\\^', '', '$1\u200d'], |
| 123 | + |
| 124 | +// sunna ending |
| 125 | +['మ్(\\s|\\.|\\, |\\))', '', 'ం$1'], |
| 126 | + |
| 127 | +// standalone vowels |
| 128 | +['అ(a|\')', '', 'ఆ'], |
| 129 | +['ఇ(i|\')', '', 'ఈ'], |
| 130 | +['ఎe', '', 'ఈ'], |
| 131 | +['ఉ(u|\')', '', 'ఊ'], |
| 132 | +['ఒo', '', 'ఊ'], |
| 133 | +['ఎ(a|\')', '', 'ఏ'], |
| 134 | +['అe', 'a', 'ఏ'], |
| 135 | +['ఎi', '', 'ఐ'], |
| 136 | +['అi', 'a', 'ఐ'], |
| 137 | +['ఒ(a|\')', '', 'ఓ'], |
| 138 | +['అo', 'a', 'ఓ'], |
| 139 | +['ఒ(u|w)', '', 'ఔ'], |
| 140 | +['అu', 'a', 'ఔ'], |
| 141 | +['ఋ(u|\')', '', 'ౠ'], |
| 142 | +['ర్\'', '', 'ఋ'], |
| 143 | + |
| 144 | +// mahaa prana |
| 145 | +['క్h', '', 'ఖ్'], |
| 146 | +['గ్h', '', 'ఘ్'], |
| 147 | +['జ్h', '', 'ఝ్'], |
| 148 | +['చ్\'', '', 'ఛ్'], |
| 149 | +['స్h', '', 'ష్'], |
| 150 | +['స్\'', '', 'శ్'], |
| 151 | +['త్\'', '', 'ట్'], |
| 152 | +['ద్\'', '', 'డ్'], |
| 153 | +['ఢ్h', '', 'ఢ్'], |
| 154 | +['న్\'', '', 'ణ్'], |
| 155 | +['త్h', '', 'థ్'], |
| 156 | +['ద్h', '', 'థ్'], |
| 157 | +['ప్h', '', 'ఫ్'], |
| 158 | +['బ్h', '', 'భ్'], |
| 159 | +['ల్\'', '', 'ళ్'], |
| 160 | + |
| 161 | +// basic |
| 162 | +['a', '', 'అ'], |
| 163 | +['b', '', 'బ్'], |
| 164 | +['~c', '', 'ౘ్'], |
| 165 | +['c', '', 'చ్'], |
| 166 | +['d', '', 'ద్'], |
| 167 | +['e', '', 'ఎ'], |
| 168 | +['(f|F|P)', '', 'ఫ్'], |
| 169 | +['g', '', 'గ్'], |
| 170 | +['@h', '', 'ః'], |
| 171 | +['h', '', 'హ్'], |
| 172 | +['i', '', 'ఇ'], |
| 173 | +['~j', '', 'ౙ్'], |
| 174 | +['j', '', 'జ్'], |
| 175 | +['k', '', 'క్'], |
| 176 | +['~l', '', 'ఌ'], |
| 177 | +['l', '', 'ల్'], |
| 178 | +['@m', '', 'ఁ'], |
| 179 | +['~m', '', 'ఙ'], |
| 180 | +['m', '', 'మ్'], |
| 181 | +['~n', '', 'ఞ'], |
| 182 | +['n', '', 'న్'], |
| 183 | +['o', '', 'ఒ'], |
| 184 | +['p', '', 'ప్'], |
| 185 | +['q', '', 'క్వ్'], |
| 186 | +['~r', '', 'ఱ్'], |
| 187 | +['r', '', 'ర్'], |
| 188 | +['s', '', 'స్'], |
| 189 | +['t', '', 'త్'], |
| 190 | +['u', '', 'ఉ'], |
| 191 | +['(v|w|V|W)', '', 'వ్'], |
| 192 | +['(x|X)', '', 'క్ష్'], |
| 193 | +['(y|Y)', '', 'య్'], |
| 194 | +['(z|Z)', '', 'జ్'], |
| 195 | +['A', '', 'ఆ'], |
| 196 | +['B', '', 'భ్'], |
| 197 | +['C', '', 'ఛ్'], |
| 198 | +['D', '', 'డ్'], |
| 199 | +['E', '', 'ఏ'], |
| 200 | +['G', '', 'ఘ్'], |
| 201 | +['H', '', 'ః'], |
| 202 | +['I', '', 'ఈ'], |
| 203 | +['J', '', 'ఝ్'], |
| 204 | +['K', '', 'ఖ్'], |
| 205 | +['L', '', 'ళ్'], |
| 206 | +['M', '', 'ం'], |
| 207 | +['N', '', 'ణ్'], |
| 208 | +['O', '', 'ఓ'], |
| 209 | +['Q', '', 'క్వ్'], |
| 210 | +['R', '', 'ఋ'], |
| 211 | +['S', '', 'శ్'], |
| 212 | +['T', '', 'ట్'], |
| 213 | +['U', '', 'ఊ'], |
| 214 | + |
| 215 | +/** |
| 216 | + * Telugu numbers |
| 217 | + */ |
| 218 | +['~0', '', '౦'], |
| 219 | +['~1', '', '౧'], |
| 220 | +['~2', '', '౨'], |
| 221 | +['~3', '', '౩'], |
| 222 | +['~4', '', '౪'], |
| 223 | +['~5', '', '౫'], |
| 224 | +['~6', '', '౬'], |
| 225 | +['~7', '', '౭'], |
| 226 | +['~8', '', '౮'], |
| 227 | +['~9', '', '౯'], |
| 228 | + |
| 229 | +// others |
| 230 | +['।~\\.', '', '॥'],// double danda |
| 231 | +['~\\.', '', '।'], // danda |
| 232 | +['//', '', 'ఽ'], // avagraha |
| 233 | +['~\\$', '', '₹'] // rupee |
| 234 | +]; |
| 235 | + |
| 236 | +jQuery.narayam.addScheme( 'te', { |
| 237 | + 'namemsg': 'narayam-te', |
| 238 | + 'extended_keyboard': false, |
| 239 | + 'lookbackLength': 4, |
| 240 | + 'keyBufferLength': 1, |
| 241 | + 'rules': rules |
| 242 | +} ); |
Property changes on: trunk/extensions/Narayam/resources/ext.narayam.rules.te.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 243 | + native |
Index: trunk/extensions/Narayam/Narayam.i18n.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | 'narayam-ta' => 'Tamil Transliteration', |
57 | 57 | 'narayam-ta-bamini' => 'Tamil Bamini', |
58 | 58 | 'narayam-tcy' => 'Tulu Transliteration', |
| 59 | + 'narayam-te' => 'Telugu Transliteration', |
59 | 60 | 'narayam-te-inscript' => 'Telugu InScript', |
60 | 61 | 'narayam-bn-avro' => 'Bengali Avro', |
61 | 62 | 'narayam-bn-inscript' => 'Bengali InScript', |
— | — | @@ -114,6 +115,7 @@ |
115 | 116 | 'narayam-si-wijesekara' => 'Wijesekara keyboard layout for the Sinhala language.', |
116 | 117 | 'narayam-ta-99' => 'Tamil 99 keyboard layout for the Tamil language.', |
117 | 118 | 'narayam-ta' => 'Transliteration scheme for the Tamil language.', |
| 119 | + 'narayam-te' => 'Transliteration scheme for the Telugu language.', |
118 | 120 | 'narayam-te-inscript' => '[[w:InScript|InScript]] keyboard layout for the [[w:Telugu language|Telugu language]].', |
119 | 121 | 'narayam-bn-avro' => 'Avro keyboard layout for the Bengali language.', |
120 | 122 | 'narayam-bn-inscript' => '[[w:InScript|InScript]] keyboard layout for the Bengali language.', |
— | — | @@ -1747,6 +1749,7 @@ |
1748 | 1750 | 'narayam-ta' => 'തമിഴ് ലിപ്യന്തരണം', |
1749 | 1751 | 'narayam-ta-bamini' => 'തമിൾ ഭാമിനി', |
1750 | 1752 | 'narayam-tcy' => 'തുളു ലിപ്യന്തരണം', |
| 1753 | + 'narayam-te' => 'തെലുഗു ലിപ്യന്തരണം', |
1751 | 1754 | 'narayam-te-inscript' => 'തെലുഗു ഇൻസ്ക്രിപ്റ്റ്', |
1752 | 1755 | 'narayam-bn-avro' => 'ബംഗാളി അവ്രൊ', |
1753 | 1756 | 'narayam-bn-inscript' => 'ബംഗാളി ഇൻസ്ക്രിപ്റ്റ്', |
Index: trunk/extensions/Narayam/Narayam.php |
— | — | @@ -144,6 +144,7 @@ |
145 | 145 | 'tcy' => array( 'ext.narayam.rules.tcy', 'beta' ), |
146 | 146 | ), |
147 | 147 | 'te' => array( |
| 148 | + 'te' => array( 'ext.narayam.rules.te', 'beta' ), |
148 | 149 | 'te-inscript' => 'ext.narayam.rules.te-inscript', |
149 | 150 | ), |
150 | 151 | 'ur' => array( |
— | — | @@ -246,6 +247,7 @@ |
247 | 248 | 'narayam-ta', |
248 | 249 | 'narayam-ta-bamini', |
249 | 250 | 'narayam-tcy', |
| 251 | + 'narayam-te', |
250 | 252 | 'narayam-te-inscript', |
251 | 253 | 'narayam-ur', |
252 | 254 | ), |
— | — | @@ -403,6 +405,10 @@ |
404 | 406 | 'scripts' => 'resources/ext.narayam.rules.ta-bamini.js', |
405 | 407 | 'dependencies' => 'ext.narayam.core', |
406 | 408 | ); |
| 409 | +$wgResourceModules['ext.narayam.rules.te'] = $narayamTpl + array( |
| 410 | + 'scripts' => 'resources/ext.narayam.rules.te.js', |
| 411 | + 'dependencies' => 'ext.narayam.core', |
| 412 | +); |
407 | 413 | $wgResourceModules['ext.narayam.rules.te-inscript'] = $narayamTpl + array( |
408 | 414 | 'scripts' => 'resources/ext.narayam.rules.te-inscript.js', |
409 | 415 | 'dependencies' => 'ext.narayam.core', |