Update jquery.i18n to 8267e1dbef

Whitespace changes only

Change-Id: I150b69b5015440215573f2f40e7ac56bacea6c90
This commit is contained in:
Niklas Laxström
2016-04-15 07:48:28 +02:00
committed by Nikerabbit
parent aba4540cef
commit 07b764a11f
20 changed files with 75 additions and 75 deletions

View File

@@ -17,7 +17,7 @@
'use strict';
var MessageParserEmitter = function () {
this.language = $.i18n.languages[String.locale] || $.i18n.languages['default'];
this.language = $.i18n.languages[ String.locale ] || $.i18n.languages[ 'default' ];
};
MessageParserEmitter.prototype = {
@@ -48,10 +48,10 @@
return messageParserEmitter.emit( n, replacements );
} );
operation = node[0].toLowerCase();
operation = node[ 0 ].toLowerCase();
if ( typeof messageParserEmitter[operation] === 'function' ) {
ret = messageParserEmitter[operation]( subnodes, replacements );
if ( typeof messageParserEmitter[ operation ] === 'function' ) {
ret = messageParserEmitter[ operation ]( subnodes, replacements );
} else {
throw new Error( 'unknown operation "' + operation + '"' );
}
@@ -106,11 +106,11 @@
* @return {string} replacement
*/
replace: function ( nodes, replacements ) {
var index = parseInt( nodes[0], 10 );
var index = parseInt( nodes[ 0 ], 10 );
if ( index < replacements.length ) {
// replacement is not a string, don't touch!
return replacements[index];
return replacements[ index ];
} else {
// index not found, fallback to displaying variable
return '$' + ( index + 1 );
@@ -128,7 +128,7 @@
* language.
*/
plural: function ( nodes ) {
var count = parseFloat( this.language.convertNumber( nodes[0], 10 ) ),
var count = parseFloat( this.language.convertNumber( nodes[ 0 ], 10 ) ),
forms = nodes.slice( 1 );
return forms.length ? this.language.convertPlural( count, forms ) : '';
@@ -142,7 +142,7 @@
* @return {String} selected gender form according to current language
*/
gender: function ( nodes ) {
var gender = nodes[0],
var gender = nodes[ 0 ],
forms = nodes.slice( 1 );
return this.language.gender( gender, forms );
@@ -157,8 +157,8 @@
* language.
*/
grammar: function ( nodes ) {
var form = nodes[0],
word = nodes[1];
var form = nodes[ 0 ],
word = nodes[ 1 ];
return word && form && this.language.convertGrammar( word, form );
}