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:
@@ -13,28 +13,29 @@
|
||||
switch ( form ) {
|
||||
case 'ഉദ്ദേശിക':
|
||||
case 'dative':
|
||||
if ( word.substr( -1 ) === 'ു'
|
||||
|| word.substr( -1 ) === 'ൂ'
|
||||
|| word.substr( -1 ) === 'ൗ'
|
||||
|| word.substr( -1 ) === 'ൌ' ) {
|
||||
if ( word.substr( -1 ) === 'ു' ||
|
||||
word.substr( -1 ) === 'ൂ' ||
|
||||
word.substr( -1 ) === 'ൗ' ||
|
||||
word.substr( -1 ) === 'ൌ'
|
||||
) {
|
||||
word += 'വിന്';
|
||||
} else if ( word.substr( -1 ) === 'ം' ) {
|
||||
word = word.substr( 0, word.length - 1 ) + 'ത്തിന്';
|
||||
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
||||
// Atomic chillu n. അവൻ -> അവന്
|
||||
word = word.substr( 0, word.length - 1 ) + 'ന്';
|
||||
} else if ( word.substr( -3 ) === 'ന്' ) {
|
||||
} else if ( word.substr( -3 ) === 'ന്\u200d' ) {
|
||||
// chillu n. അവൻ -> അവന്
|
||||
word = word.substr( 0, word.length - 1 );
|
||||
} else if ( word.substr( -1 ) === 'ൾ' || word.substr( -3 ) === 'ള്' ) {
|
||||
} else if ( word.substr( -1 ) === 'ൾ' || word.substr( -3 ) === 'ള്\u200d' ) {
|
||||
word += 'ക്ക്';
|
||||
} else if ( word.substr( -1 ) === 'ർ' || word.substr( -3 ) === 'ര്' ) {
|
||||
} else if ( word.substr( -1 ) === 'ർ' || word.substr( -3 ) === 'ര്\u200d' ) {
|
||||
word += 'ക്ക്';
|
||||
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
||||
// Atomic chillu ൽ , ഫയൽ -> ഫയലിന്
|
||||
word = word.substr( 0, word.length - 1 ) + 'ലിന്';
|
||||
} else if ( word.substr( -3 ) === 'ല്' ) {
|
||||
// chillu ല് , ഫയല് -> ഫയലിന്
|
||||
} else if ( word.substr( -3 ) === 'ല്\u200d' ) {
|
||||
// chillu ല്\u200d , ഫയല്\u200d -> ഫയലിന്
|
||||
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
||||
} else if ( word.substr( -2 ) === 'ു്' ) {
|
||||
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
||||
@@ -44,6 +45,7 @@
|
||||
// കാവ്യ -> കാവ്യയ്ക്ക്, ഹരി -> ഹരിയ്ക്ക്, മല -> മലയ്ക്ക്
|
||||
word += 'യ്ക്ക്';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'സംബന്ധിക':
|
||||
case 'genitive':
|
||||
@@ -53,31 +55,32 @@
|
||||
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
||||
} else if ( word.substr( -1 ) === '്' ) {
|
||||
word = word.substr( 0, word.length - 1 ) + 'ിന്റെ';
|
||||
} else if ( word.substr( -1 ) === 'ു'
|
||||
|| word.substr( -1 ) === 'ൂ'
|
||||
|| word.substr( -1 ) === 'ൗ'
|
||||
|| word.substr( -1 ) === 'ൌ' ) {
|
||||
} else if ( word.substr( -1 ) === 'ു' ||
|
||||
word.substr( -1 ) === 'ൂ' ||
|
||||
word.substr( -1 ) === 'ൗ' ||
|
||||
word.substr( -1 ) === 'ൌ'
|
||||
) {
|
||||
word += 'വിന്റെ';
|
||||
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
||||
// Atomic chillu n. അവൻ -> അവന്റെ
|
||||
word = word.substr( 0, word.length - 1 ) + 'ന്റെ';
|
||||
} else if ( word.substr( -3 ) === 'ന്' ) {
|
||||
} else if ( word.substr( -3 ) === 'ന്\u200d' ) {
|
||||
// chillu n. അവൻ -> അവന്റെ
|
||||
word = word.substr( 0, word.length -1 ) + 'റെ';
|
||||
} else if ( word.substr( -3 ) === 'ള്' ) {
|
||||
word = word.substr( 0, word.length - 1 ) + 'റെ';
|
||||
} else if ( word.substr( -3 ) === 'ള്\u200d' ) {
|
||||
// chillu n. അവൾ -> അവളുടെ
|
||||
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
||||
} else if ( word.substr( -1 ) === 'ൾ' ) {
|
||||
// Atomic chillu n. അവള് -> അവളുടെ
|
||||
// Atomic chillu n. അവള്\u200d -> അവളുടെ
|
||||
word = word.substr( 0, word.length - 1 ) + 'ളുടെ';
|
||||
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
||||
// Atomic l. മുയല് -> മുയലിന്റെ
|
||||
// Atomic l. മുയല്\u200d -> മുയലിന്റെ
|
||||
word = word.substr( 0, word.length - 1 ) + 'ലിന്റെ';
|
||||
} else if ( word.substr( -3 ) === 'ല്' ) {
|
||||
// chillu l. മുയല് -> അവളുടെ
|
||||
} else if ( word.substr( -3 ) === 'ല്\u200d' ) {
|
||||
// chillu l. മുയല്\u200d -> അവളുടെ
|
||||
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
||||
} else if ( word.substr( -3 ) === 'ര്' ) {
|
||||
// chillu r. അവര് -> അവരുടെ
|
||||
} else if ( word.substr( -3 ) === 'ര്\u200d' ) {
|
||||
// chillu r. അവര്\u200d -> അവരുടെ
|
||||
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
||||
} else if ( word.substr( -1 ) === 'ർ' ) {
|
||||
// Atomic chillu r. അവർ -> അവരുടെ
|
||||
@@ -85,8 +88,10 @@
|
||||
} else {
|
||||
word += 'യുടെ';
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return word;
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -9,14 +9,17 @@
|
||||
|
||||
$.i18n.languages.os = $.extend( {}, $.i18n.languages['default'], {
|
||||
convertGrammar: function ( word, form ) {
|
||||
var endAllative, jot, hyphen, ending;
|
||||
|
||||
// Ending for allative case
|
||||
var endAllative = 'мæ';
|
||||
endAllative = 'мæ';
|
||||
// Variable for 'j' beetwen vowels
|
||||
var jot = '';
|
||||
jot = '';
|
||||
// Variable for "-" for not Ossetic words
|
||||
var hyphen = '';
|
||||
hyphen = '';
|
||||
// Variable for ending
|
||||
var ending = '';
|
||||
ending = '';
|
||||
|
||||
// Checking if the $word is in plural form
|
||||
if ( word.match( /тæ$/i ) ) {
|
||||
word = word.substring( 0, word.length - 1 );
|
||||
|
||||
@@ -8,21 +8,17 @@
|
||||
$.i18n.languages.ru = $.extend( {}, $.i18n.languages['default'], {
|
||||
convertGrammar: function ( word, form ) {
|
||||
if ( form === '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 ) + 'ника';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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