2 * Ossetian (Ирон) language functions
3 * @author Santhosh Thottingal
6 mediaWiki.language.convertGrammar = function ( word, form ) {
7 var grammarForms = mediaWiki.language.getData( 'os', 'grammarForms' ),
8 // Ending for allative case
10 // Variable for 'j' beetwen vowels
12 // Variable for "-" for not Ossetic words
14 // Variable for ending
17 if ( grammarForms && grammarForms[form] ) {
18 return grammarForms[form][word];
20 // Checking if the $word is in plural form
21 if ( word.match( /тæ$/i ) ) {
22 word = word.slice( 0, -1 );
25 // Works if word is in singular form.
26 // Checking if word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
27 else if ( word.match( /[аæеёиоыэюя]$/i ) ) {
30 // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
31 // Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
32 else if ( word.match( /у$/i ) ) {
33 if ( !word.slice( -2, -1 ).match( /[аæеёиоыэюя]$/i ) ) {
36 } else if ( !word.match( /[бвгджзйклмнопрстфхцчшщьъ]$/i ) ) {
42 ending = hyphen + jot + 'ы';
45 ending = hyphen + jot + 'æн';
48 ending = hyphen + endAllative;
52 ending = hyphen + jot + 'æ';
55 ending = hyphen + jot + 'æй';
59 ending = hyphen + jot + 'ыл';
62 ending = hyphen + jot + 'ау';
65 ending = hyphen + 'имæ';