X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.language%2Flanguages%2Fos.js;h=554e99d4c5f3640592dc59233bdf73eca1701508;hb=b0bc463c46d6a41157bc4cfd68da1a9d6bc38571;hp=787be36df35b3e35fbbacbc548123ceb2a44f64e;hpb=523c6c0e41159c073b6b44dd550878f42cbc847e;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.language/languages/os.js b/resources/src/mediawiki.language/languages/os.js index 787be36df3..554e99d4c5 100644 --- a/resources/src/mediawiki.language/languages/os.js +++ b/resources/src/mediawiki.language/languages/os.js @@ -21,15 +21,14 @@ mediaWiki.language.convertGrammar = function ( word, form ) { if ( word.match( /тæ$/i ) ) { word = word.slice( 0, -1 ); endAllative = 'æм'; - } - // Works if word is in singular form. - // Checking if word ends on one of the vowels: е, ё, и, о, ы, э, ю, я. - else if ( word.match( /[аæеёиоыэюя]$/i ) ) { + } else if ( word.match( /[аæеёиоыэюя]$/i ) ) { + // Works if word is in singular form. + // Checking if word ends on one of the vowels: е, ё, и, о, ы, э, ю, я. jot = 'й'; - } - // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. - // Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. - else if ( word.match( /у$/i ) ) { + } else if ( word.match( /у$/i ) ) { + // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. + // Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. + if ( !word.slice( -2, -1 ).match( /[аæеёиоыэюя]$/i ) ) { jot = 'й'; } @@ -50,8 +49,7 @@ mediaWiki.language.convertGrammar = function ( word, form ) { case 'ablative': if ( jot === 'й' ) { ending = hyphen + jot + 'æ'; - } - else { + } else { ending = hyphen + jot + 'æй'; } break;