Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / resources / lib / jquery.i18n / src / languages / ru.js
1 /**
2 * Russian (Русский) language functions
3 */
4
5 ( function ( $ ) {
6 'use strict';
7
8 $.i18n.languages.ru = $.extend( {}, $.i18n.languages['default'], {
9 convertGrammar: function ( word, form ) {
10 if ( form === 'genitive' ) { // родительный падеж
11 if ( word.substr( -1 ) === 'ь' ) {
12 word = word.substr( 0, word.length - 1 ) + 'я';
13 } else if ( word.substr( -2 ) === 'ия' ) {
14 word = word.substr( 0, word.length - 2 ) + 'ии';
15 } else if ( word.substr( -2 ) === 'ка' ) {
16 word = word.substr( 0, word.length - 2 ) + 'ки';
17 } else if ( word.substr( -2 ) === 'ти' ) {
18 word = word.substr( 0, word.length - 2 ) + 'тей';
19 } else if ( word.substr( -2 ) === 'ды' ) {
20 word = word.substr( 0, word.length - 2 ) + 'дов';
21 } else if ( word.substr( -3 ) === 'ник' ) {
22 word = word.substr( 0, word.length - 3 ) + 'ника';
23 }
24 }
25
26 return word;
27 }
28 } );
29 }( jQuery ) );