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:
@@ -165,5 +165,4 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.extend( $.i18n.parser.emitter, new MessageParserEmitter() );
|
$.extend( $.i18n.parser.emitter, new MessageParserEmitter() );
|
||||||
|
|
||||||
}( jQuery ) );
|
}( jQuery ) );
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
$.i18n = $.i18n || {};
|
$.i18n = $.i18n || {};
|
||||||
$.i18n.fallbacks = {
|
$.extend( $.i18n.fallbacks, {
|
||||||
'ab': ['ru'],
|
'ab': ['ru'],
|
||||||
'ace': ['id'],
|
'ace': ['id'],
|
||||||
'aln': ['sq'],
|
'aln': ['sq'],
|
||||||
@@ -182,5 +182,5 @@
|
|||||||
'zh-sg': ['zh-hans'],
|
'zh-sg': ['zh-hans'],
|
||||||
'zh-tw': ['zh-hant', 'zh-hans'],
|
'zh-tw': ['zh-hant', 'zh-hans'],
|
||||||
'zh-yue': ['yue']
|
'zh-yue': ['yue']
|
||||||
};
|
} );
|
||||||
}( jQuery ) );
|
}( jQuery ) );
|
||||||
|
|||||||
@@ -40,16 +40,15 @@
|
|||||||
* String.prototype.toLocaleString and String.locale.
|
* String.prototype.toLocaleString and String.locale.
|
||||||
*/
|
*/
|
||||||
init: function () {
|
init: function () {
|
||||||
var i18n;
|
var i18n = this;
|
||||||
|
|
||||||
i18n = this;
|
|
||||||
// Set locale of String environment
|
// Set locale of String environment
|
||||||
String.locale = i18n.locale;
|
String.locale = i18n.locale;
|
||||||
|
|
||||||
// Override String.localeString method
|
// Override String.localeString method
|
||||||
String.prototype.toLocaleString = function () {
|
String.prototype.toLocaleString = function () {
|
||||||
var localeParts, localePartIndex, value, locale, fallbackIndex,
|
var localeParts, localePartIndex, value, locale, fallbackIndex,
|
||||||
_locale, message;
|
tryingLocale, message;
|
||||||
|
|
||||||
value = this.valueOf();
|
value = this.valueOf();
|
||||||
locale = i18n.locale;
|
locale = i18n.locale;
|
||||||
@@ -62,11 +61,13 @@
|
|||||||
localePartIndex = localeParts.length;
|
localePartIndex = localeParts.length;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
_locale = localeParts.slice( 0, localePartIndex ).join( '-' );
|
tryingLocale = localeParts.slice( 0, localePartIndex ).join( '-' );
|
||||||
message = i18n.messageStore.get( _locale, value );
|
message = i18n.messageStore.get( tryingLocale, value );
|
||||||
|
|
||||||
if ( message ) {
|
if ( message ) {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
localePartIndex--;
|
localePartIndex--;
|
||||||
} while ( localePartIndex );
|
} while ( localePartIndex );
|
||||||
|
|
||||||
@@ -137,7 +138,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process a message from the $.I18N instance
|
* Process a message from the $.I18N instance
|
||||||
* for the current document, stored in jQuery.data(document).
|
* for the current document, stored in jQuery.data(document).
|
||||||
@@ -184,12 +184,12 @@
|
|||||||
|
|
||||||
$.fn.i18n = function () {
|
$.fn.i18n = function () {
|
||||||
var i18n = $.data( document, 'i18n' );
|
var i18n = $.data( document, 'i18n' );
|
||||||
String.locale = i18n.locale;
|
|
||||||
if ( !i18n ) {
|
if ( !i18n ) {
|
||||||
i18n = new I18N();
|
i18n = new I18N();
|
||||||
$.data( document, 'i18n', i18n );
|
$.data( document, 'i18n', i18n );
|
||||||
}
|
}
|
||||||
|
String.locale = i18n.locale;
|
||||||
return this.each( function () {
|
return this.each( function () {
|
||||||
var $this = $( this ),
|
var $this = $( this ),
|
||||||
messageKey = $this.data( 'i18n' );
|
messageKey = $this.data( 'i18n' );
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
},
|
},
|
||||||
emitter: {}
|
emitter: {}
|
||||||
};
|
};
|
||||||
|
$.i18n.fallbacks = {};
|
||||||
$.i18n.debug = false;
|
$.i18n.debug = false;
|
||||||
$.i18n.log = function ( /* arguments */ ) {
|
$.i18n.log = function ( /* arguments */ ) {
|
||||||
if ( window.console && $.i18n.debug ) {
|
if ( window.console && $.i18n.debug ) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var language = {
|
var language = {
|
||||||
|
|
||||||
// CLDR plural rules generated using
|
// CLDR plural rules generated using
|
||||||
// http://i18ndata.appspot.com/cldr/tags/unconfirmed/supplemental/plurals?action=browse&depth=-1
|
// http://i18ndata.appspot.com/cldr/tags/unconfirmed/supplemental/plurals?action=browse&depth=-1
|
||||||
// and compressed
|
// and compressed
|
||||||
@@ -522,12 +521,35 @@
|
|||||||
* @return string Correct form for quantifier in this language
|
* @return string Correct form for quantifier in this language
|
||||||
*/
|
*/
|
||||||
convertPlural: function ( count, forms ) {
|
convertPlural: function ( count, forms ) {
|
||||||
var pluralRules, pluralFormIndex;
|
var pluralRules,
|
||||||
|
pluralFormIndex,
|
||||||
|
index,
|
||||||
|
explicitPluralPattern = new RegExp('\\d+=', 'i'),
|
||||||
|
formCount,
|
||||||
|
form;
|
||||||
|
|
||||||
if ( !forms || forms.length === 0 ) {
|
if ( !forms || forms.length === 0 ) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle for Explicit 0= & 1= values
|
||||||
|
for ( index = 0; index < forms.length; index++ ) {
|
||||||
|
form = forms[index];
|
||||||
|
if ( explicitPluralPattern.test( form ) ) {
|
||||||
|
formCount = parseInt( form.substring( 0, form.indexOf( '=' ) ), 10 );
|
||||||
|
if ( formCount === count ) {
|
||||||
|
return ( form.substr( form.indexOf( '=' ) + 1 ) );
|
||||||
|
}
|
||||||
|
forms[index] = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
forms = $.map( forms, function ( form ) {
|
||||||
|
if ( form !== undefined ) {
|
||||||
|
return form;
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
pluralRules = this.pluralRules[$.i18n().locale];
|
pluralRules = this.pluralRules[$.i18n().locale];
|
||||||
|
|
||||||
if ( !pluralRules ) {
|
if ( !pluralRules ) {
|
||||||
@@ -621,7 +643,7 @@
|
|||||||
* @param form {String}
|
* @param form {String}
|
||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
convertGrammar: function ( word, form ) {
|
convertGrammar: function ( word, form ) { /*jshint unused: false */
|
||||||
return word;
|
return word;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -109,5 +109,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$.extend( $.i18n.messageStore, new MessageStore() );
|
$.extend( $.i18n.messageStore, new MessageStore() );
|
||||||
|
|
||||||
}( jQuery, window ) );
|
}( jQuery, window ) );
|
||||||
|
|||||||
@@ -13,28 +13,29 @@
|
|||||||
switch ( form ) {
|
switch ( form ) {
|
||||||
case 'ഉദ്ദേശിക':
|
case 'ഉദ്ദേശിക':
|
||||||
case 'dative':
|
case 'dative':
|
||||||
if ( word.substr( -1 ) === 'ു'
|
if ( word.substr( -1 ) === 'ു' ||
|
||||||
|| word.substr( -1 ) === 'ൂ'
|
word.substr( -1 ) === 'ൂ' ||
|
||||||
|| word.substr( -1 ) === 'ൗ'
|
word.substr( -1 ) === 'ൗ' ||
|
||||||
|| word.substr( -1 ) === 'ൌ' ) {
|
word.substr( -1 ) === 'ൌ'
|
||||||
|
) {
|
||||||
word += 'വിന്';
|
word += 'വിന്';
|
||||||
} else if ( word.substr( -1 ) === 'ം' ) {
|
} else if ( word.substr( -1 ) === 'ം' ) {
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ത്തിന്';
|
word = word.substr( 0, word.length - 1 ) + 'ത്തിന്';
|
||||||
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
||||||
// Atomic chillu n. അവൻ -> അവന്
|
// Atomic chillu n. അവൻ -> അവന്
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ന്';
|
word = word.substr( 0, word.length - 1 ) + 'ന്';
|
||||||
} else if ( word.substr( -3 ) === 'ന്' ) {
|
} else if ( word.substr( -3 ) === 'ന്\u200d' ) {
|
||||||
// chillu n. അവൻ -> അവന്
|
// chillu n. അവൻ -> അവന്
|
||||||
word = word.substr( 0, word.length - 1 );
|
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 += 'ക്ക്';
|
word += 'ക്ക്';
|
||||||
} else if ( word.substr( -1 ) === 'ർ' || word.substr( -3 ) === 'ര്' ) {
|
} else if ( word.substr( -1 ) === 'ർ' || word.substr( -3 ) === 'ര്\u200d' ) {
|
||||||
word += 'ക്ക്';
|
word += 'ക്ക്';
|
||||||
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
||||||
// Atomic chillu ൽ , ഫയൽ -> ഫയലിന്
|
// Atomic chillu ൽ , ഫയൽ -> ഫയലിന്
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ലിന്';
|
word = word.substr( 0, word.length - 1 ) + 'ലിന്';
|
||||||
} else if ( word.substr( -3 ) === 'ല്' ) {
|
} else if ( word.substr( -3 ) === 'ല്\u200d' ) {
|
||||||
// chillu ല് , ഫയല് -> ഫയലിന്
|
// chillu ല്\u200d , ഫയല്\u200d -> ഫയലിന്
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
||||||
} else if ( word.substr( -2 ) === 'ു്' ) {
|
} else if ( word.substr( -2 ) === 'ു്' ) {
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
word = word.substr( 0, word.length - 2 ) + 'ിന്';
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
// കാവ്യ -> കാവ്യയ്ക്ക്, ഹരി -> ഹരിയ്ക്ക്, മല -> മലയ്ക്ക്
|
// കാവ്യ -> കാവ്യയ്ക്ക്, ഹരി -> ഹരിയ്ക്ക്, മല -> മലയ്ക്ക്
|
||||||
word += 'യ്ക്ക്';
|
word += 'യ്ക്ക്';
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'സംബന്ധിക':
|
case 'സംബന്ധിക':
|
||||||
case 'genitive':
|
case 'genitive':
|
||||||
@@ -53,31 +55,32 @@
|
|||||||
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
||||||
} else if ( word.substr( -1 ) === '്' ) {
|
} else if ( word.substr( -1 ) === '്' ) {
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ിന്റെ';
|
word = word.substr( 0, word.length - 1 ) + 'ിന്റെ';
|
||||||
} else if ( word.substr( -1 ) === 'ു'
|
} else if ( word.substr( -1 ) === 'ു' ||
|
||||||
|| word.substr( -1 ) === 'ൂ'
|
word.substr( -1 ) === 'ൂ' ||
|
||||||
|| word.substr( -1 ) === 'ൗ'
|
word.substr( -1 ) === 'ൗ' ||
|
||||||
|| word.substr( -1 ) === 'ൌ' ) {
|
word.substr( -1 ) === 'ൌ'
|
||||||
|
) {
|
||||||
word += 'വിന്റെ';
|
word += 'വിന്റെ';
|
||||||
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
} else if ( word.substr( -1 ) === 'ൻ' ) {
|
||||||
// Atomic chillu n. അവൻ -> അവന്റെ
|
// Atomic chillu n. അവൻ -> അവന്റെ
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ന്റെ';
|
word = word.substr( 0, word.length - 1 ) + 'ന്റെ';
|
||||||
} else if ( word.substr( -3 ) === 'ന്' ) {
|
} else if ( word.substr( -3 ) === 'ന്\u200d' ) {
|
||||||
// chillu n. അവൻ -> അവന്റെ
|
// chillu n. അവൻ -> അവന്റെ
|
||||||
word = word.substr( 0, word.length - 1 ) + 'റെ';
|
word = word.substr( 0, word.length - 1 ) + 'റെ';
|
||||||
} else if ( word.substr( -3 ) === 'ള്' ) {
|
} else if ( word.substr( -3 ) === 'ള്\u200d' ) {
|
||||||
// chillu n. അവൾ -> അവളുടെ
|
// chillu n. അവൾ -> അവളുടെ
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
||||||
} else if ( word.substr( -1 ) === 'ൾ' ) {
|
} else if ( word.substr( -1 ) === 'ൾ' ) {
|
||||||
// Atomic chillu n. അവള് -> അവളുടെ
|
// Atomic chillu n. അവള്\u200d -> അവളുടെ
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ളുടെ';
|
word = word.substr( 0, word.length - 1 ) + 'ളുടെ';
|
||||||
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
} else if ( word.substr( -1 ) === 'ൽ' ) {
|
||||||
// Atomic l. മുയല് -> മുയലിന്റെ
|
// Atomic l. മുയല്\u200d -> മുയലിന്റെ
|
||||||
word = word.substr( 0, word.length - 1 ) + 'ലിന്റെ';
|
word = word.substr( 0, word.length - 1 ) + 'ലിന്റെ';
|
||||||
} else if ( word.substr( -3 ) === 'ല്' ) {
|
} else if ( word.substr( -3 ) === 'ല്\u200d' ) {
|
||||||
// chillu l. മുയല് -> അവളുടെ
|
// chillu l. മുയല്\u200d -> അവളുടെ
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
|
||||||
} else if ( word.substr( -3 ) === 'ര്' ) {
|
} else if ( word.substr( -3 ) === 'ര്\u200d' ) {
|
||||||
// chillu r. അവര് -> അവരുടെ
|
// chillu r. അവര്\u200d -> അവരുടെ
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
word = word.substr( 0, word.length - 2 ) + 'ുടെ';
|
||||||
} else if ( word.substr( -1 ) === 'ർ' ) {
|
} else if ( word.substr( -1 ) === 'ർ' ) {
|
||||||
// Atomic chillu r. അവർ -> അവരുടെ
|
// Atomic chillu r. അവർ -> അവരുടെ
|
||||||
@@ -85,8 +88,10 @@
|
|||||||
} else {
|
} else {
|
||||||
word += 'യുടെ';
|
word += 'യുടെ';
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return word;
|
return word;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|||||||
@@ -9,14 +9,17 @@
|
|||||||
|
|
||||||
$.i18n.languages.os = $.extend( {}, $.i18n.languages['default'], {
|
$.i18n.languages.os = $.extend( {}, $.i18n.languages['default'], {
|
||||||
convertGrammar: function ( word, form ) {
|
convertGrammar: function ( word, form ) {
|
||||||
|
var endAllative, jot, hyphen, ending;
|
||||||
|
|
||||||
// Ending for allative case
|
// Ending for allative case
|
||||||
var endAllative = 'мæ';
|
endAllative = 'мæ';
|
||||||
// Variable for 'j' beetwen vowels
|
// Variable for 'j' beetwen vowels
|
||||||
var jot = '';
|
jot = '';
|
||||||
// Variable for "-" for not Ossetic words
|
// Variable for "-" for not Ossetic words
|
||||||
var hyphen = '';
|
hyphen = '';
|
||||||
// Variable for ending
|
// Variable for ending
|
||||||
var ending = '';
|
ending = '';
|
||||||
|
|
||||||
// Checking if the $word is in plural form
|
// Checking if the $word is in plural form
|
||||||
if ( word.match( /тæ$/i ) ) {
|
if ( word.match( /тæ$/i ) ) {
|
||||||
word = word.substring( 0, word.length - 1 );
|
word = word.substring( 0, word.length - 1 );
|
||||||
|
|||||||
@@ -8,21 +8,17 @@
|
|||||||
$.i18n.languages.ru = $.extend( {}, $.i18n.languages['default'], {
|
$.i18n.languages.ru = $.extend( {}, $.i18n.languages['default'], {
|
||||||
convertGrammar: function ( word, form ) {
|
convertGrammar: function ( word, form ) {
|
||||||
if ( form === 'genitive' ) { // родительный падеж
|
if ( form === 'genitive' ) { // родительный падеж
|
||||||
if ( ( word.substr( word.length - 4 ) === 'вики' ) ||
|
if ( word.substr( -1 ) === 'ь' ) {
|
||||||
( word.substr( word.length - 4 ) === 'Вики' )
|
|
||||||
) {
|
|
||||||
// ...
|
|
||||||
} else if ( word.substr( word.length - 1 ) === 'ь' ) {
|
|
||||||
word = word.substr( 0, word.length - 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 ) + 'ии';
|
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 ) + 'ки';
|
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 ) + 'тей';
|
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 ) + 'дов';
|
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 ) + 'ника';
|
word = word.substr( 0, word.length - 3 ) + 'ника';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,31 +9,23 @@
|
|||||||
convertGrammar: function ( word, form ) {
|
convertGrammar: function ( word, form ) {
|
||||||
switch ( form ) {
|
switch ( form ) {
|
||||||
case 'genitive': // родовий відмінок
|
case 'genitive': // родовий відмінок
|
||||||
if ( ( word.substr( word.length - 4 ) === 'вікі' ) ||
|
if ( word.substr( -1 ) === 'ь' ) {
|
||||||
( word.substr( word.length - 4 ) === 'Вікі' )
|
|
||||||
) {
|
|
||||||
// ...
|
|
||||||
} else if ( word.substr( word.length - 1 ) === 'ь' ) {
|
|
||||||
word = word.substr( 0, word.length - 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 ) + 'ії';
|
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 ) + 'ки';
|
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 ) + 'тей';
|
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 ) + 'дов';
|
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 ) + 'ника';
|
word = word.substr( 0, word.length - 3 ) + 'ника';
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'accusative': // знахідний відмінок
|
case 'accusative': // знахідний відмінок
|
||||||
if ( ( word.substr( word.length - 4 ) === 'вікі' ) ||
|
if ( word.substr( -2 ) === 'ія' ) {
|
||||||
( word.substr( word.length - 4 ) === 'Вікі' )
|
|
||||||
) {
|
|
||||||
// ...
|
|
||||||
} else if ( word.substr( word.length - 2 ) === 'ія' ) {
|
|
||||||
word = word.substr( 0, word.length - 2 ) + 'ію';
|
word = word.substr( 0, word.length - 2 ) + 'ію';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user