diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /resources/lib/jquery.i18n/src/languages/uk.js | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'resources/lib/jquery.i18n/src/languages/uk.js')
-rw-r--r-- | resources/lib/jquery.i18n/src/languages/uk.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/resources/lib/jquery.i18n/src/languages/uk.js b/resources/lib/jquery.i18n/src/languages/uk.js new file mode 100644 index 00000000..8e69efcd --- /dev/null +++ b/resources/lib/jquery.i18n/src/languages/uk.js @@ -0,0 +1,39 @@ +/** + * Ukrainian (Українська) language functions + */ + +( function ( $ ) { + 'use strict'; + + $.i18n.languages.uk = $.extend( {}, $.i18n.languages['default'], { + convertGrammar: function ( word, form ) { + switch ( form ) { + case 'genitive': // родовий відмінок + if ( word.substr( -1 ) === 'ь' ) { + word = word.substr( 0, word.length - 1 ) + 'я'; + } else if ( word.substr( -2 ) === 'ія' ) { + word = word.substr( 0, word.length - 2 ) + 'ії'; + } else if ( word.substr( -2 ) === 'ка' ) { + word = word.substr( 0, word.length - 2 ) + 'ки'; + } else if ( word.substr( -2 ) === 'ти' ) { + word = word.substr( 0, word.length - 2 ) + 'тей'; + } else if ( word.substr( -2 ) === 'ды' ) { + word = word.substr( 0, word.length - 2 ) + 'дов'; + } else if ( word.substr( -3 ) === 'ник' ) { + word = word.substr( 0, word.length - 3 ) + 'ника'; + } + + break; + case 'accusative': // знахідний відмінок + if ( word.substr( -2 ) === 'ія' ) { + word = word.substr( 0, word.length - 2 ) + 'ію'; + } + + break; + } + + return word; + } + } ); + +}( jQuery ) ); |