Update jquery.i18n from upstream
Upstream: https://github.com/wikimedia/jquery.i18n Upstream changes: * Fixed a potential js error because of wrong logic * Fixed some JShint errors * Added license and credits files * Updated gitignore file * Fixed uk and ru grammar rules and updating tests * Source code formatting updates Change-Id: I43433cc3d9993045160dc85ed9e73370d22794cf
This commit is contained in:
@@ -9,31 +9,23 @@
|
||||
convertGrammar: function ( word, form ) {
|
||||
switch ( form ) {
|
||||
case 'genitive': // родовий відмінок
|
||||
if ( ( word.substr( word.length - 4 ) === 'вікі' ) ||
|
||||
( word.substr( word.length - 4 ) === 'Вікі' )
|
||||
) {
|
||||
// ...
|
||||
} else if ( word.substr( word.length - 1 ) === 'ь' ) {
|
||||
if ( word.substr( -1 ) === 'ь' ) {
|
||||
word = word.substr( 0, word.length - 1 ) + 'я';
|
||||
} else if ( word.substr( word.length - 2 ) === 'ія' ) {
|
||||
} else if ( word.substr( -2 ) === 'ія' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'ії';
|
||||
} else if ( word.substr( word.length - 2 ) === 'ка' ) {
|
||||
} else if ( word.substr( -2 ) === 'ка' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'ки';
|
||||
} else if ( word.substr( word.length - 2 ) === 'ти' ) {
|
||||
} else if ( word.substr( -2 ) === 'ти' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'тей';
|
||||
} else if ( word.substr( word.length - 2 ) === 'ды' ) {
|
||||
} else if ( word.substr( -2 ) === 'ды' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'дов';
|
||||
} else if ( word.substr( word.length - 3 ) === 'ник' ) {
|
||||
} else if ( word.substr( -3 ) === 'ник' ) {
|
||||
word = word.substr( 0, word.length - 3 ) + 'ника';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'accusative': // знахідний відмінок
|
||||
if ( ( word.substr( word.length - 4 ) === 'вікі' ) ||
|
||||
( word.substr( word.length - 4 ) === 'Вікі' )
|
||||
) {
|
||||
// ...
|
||||
} else if ( word.substr( word.length - 2 ) === 'ія' ) {
|
||||
if ( word.substr( -2 ) === 'ія' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'ію';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user