Merge "SpecialWantedcategories: Actually strike the category if it was emptied"
[lhc/web/wiklou.git] / resources / mediawiki.language / languages / uk.js
1 /*!
2 * Ukrainian (Українська) language functions
3 */
4
5 mediaWiki.language.convertGrammar = function ( word, form ) {
6 /*jshint noempty:false */
7 var grammarForms = mediaWiki.language.getData( 'uk', 'grammarForms' );
8 if ( grammarForms && grammarForms[form] ) {
9 return grammarForms[form][word];
10 }
11 switch ( form ) {
12 case 'genitive': // родовий відмінок
13 if ( ( word.substr( word.length - 4 ) === 'вікі' ) || ( word.substr( word.length - 4 ) === 'Вікі' ) ) {
14 } else if ( word.substr( word.length - 1 ) === 'ь' ) {
15 word = word.substr(0, word.length - 1 ) + 'я';
16 } else if ( word.substr( word.length - 2 ) === 'ія' ) {
17 word = word.substr(0, word.length - 2 ) + 'ії';
18 } else if ( word.substr( word.length - 2 ) === 'ка' ) {
19 word = word.substr(0, word.length - 2 ) + 'ки';
20 } else if ( word.substr( word.length - 2 ) === 'ти' ) {
21 word = word.substr(0, word.length - 2 ) + 'тей';
22 } else if ( word.substr( word.length - 2 ) === 'ды' ) {
23 word = word.substr(0, word.length - 2 ) + 'дов';
24 } else if ( word.substr( word.length - 3 ) === 'ник' ) {
25 word = word.substr(0, word.length - 3 ) + 'ника';
26 }
27 break;
28 case 'accusative': // знахідний відмінок
29 if ( ( word.substr( word.length - 4 ) === 'вікі' ) || ( word.substr( word.length - 4 ) === 'Вікі' ) ) {
30 }
31 else if ( word.substr( word.length - 2 ) === 'ія' ) {
32 word = word.substr(0, word.length - 2 ) + 'ію';
33 }
34 break;
35 }
36 return word;
37 };