2 * Ossetian (Ирон) language functions
3 * @author Santhosh Thottingal
7 mediaWiki.language.convertGrammar = function ( word, form ) {
8 var grammarForms = mediaWiki.language.getData( 'os', 'grammarForms' ),
9 // Ending for allative case
11 // Variable for 'j' beetwen vowels
13 // Variable for "-" for not Ossetic words
15 // Variable for ending
18 if ( grammarForms && grammarForms[form] ) {
19 return grammarForms[form][word];
21 // Checking if the $word is in plural form
22 if ( word.match( /тæ$/i ) ) {
23 word = word.substring( 0, word.length - 1 );
26 // Works if word is in singular form.
27 // Checking if word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
28 else if ( word.match( /[аæеёиоыэюя]$/i ) ) {
31 // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
32 // Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
33 else if ( word.match( /у$/i ) ) {
34 if ( ! word.substring( word.length-2, word.length-1 ).match( /[аæеёиоыэюя]$/i ) ) {
37 } else if ( !word.match( /[бвгджзйклмнопрстфхцчшщьъ]$/i ) ) {
43 ending = hyphen + jot + 'ы';
46 ending = hyphen + jot + 'æн';
49 ending = hyphen + endAllative;
53 ending = hyphen + jot + 'æ';
56 ending = hyphen + jot + 'æй';
60 ending = hyphen + jot + 'ыл';
63 ending = hyphen + jot + 'ау';
66 ending = hyphen + 'имæ';