Upgrade jquery.i18n library from v1.0.2 to v1.0.3

Change-Id: Ia1d346f38180a11602bbac66755cb36f98b98948
This commit is contained in:
James D. Forrester
2015-07-07 16:36:14 -07:00
parent c3322ba830
commit 05dd11fcb0
13 changed files with 1334 additions and 396 deletions

View File

@@ -123,9 +123,9 @@
* can also be passed. Example:
* <code>
* load( {
* 'bn': 'i18n/bn.json',
* 'he': 'i18n/he.json',
* 'en': 'i18n/en.json'
* bn: 'i18n/bn.json',
* he: 'i18n/he.json',
* en: 'i18n/en.json'
* } )
* </code>
*
@@ -138,12 +138,12 @@
*/
load: function ( source, locale ) {
var fallbackLocales, locIndex, fallbackLocale, sourceMap = {};
if (!source && !locale) {
if ( !source && !locale ) {
source = 'i18n/' + $.i18n().locale + '.json';
locale = $.i18n().locale;
}
if ( typeof source === 'string' &&
source.split('.').pop() !== 'json'
source.split( '.' ).pop() !== 'json'
) {
// Load specified locale then check for fallbacks when directory is specified in load()
sourceMap[locale] = source + '/' + locale + '.json';
@@ -173,7 +173,7 @@
// should probably not change the 'this.parser' but just
// pass it to the parser.
this.parser.language = $.i18n.languages[$.i18n().locale] || $.i18n.languages['default'];
if( message === '' ) {
if ( message === '' ) {
message = key;
}
return this.parser.parse( message, parameters );