Merge "Update jquery.i18n to b9906c0"

This commit is contained in:
jenkins-bot
2014-12-29 11:26:33 +00:00
committed by Gerrit Code Review

View File

@@ -138,10 +138,15 @@
*/
load: function ( source, locale ) {
var fallbackLocales, locIndex, fallbackLocale, sourceMap = {};
if (!source && !locale) {
source = 'i18n/' + $.i18n().locale + '.json';
locale = $.i18n().locale;
}
if ( typeof source === 'string' &&
source.split('.').pop() !== 'json'
) {
// Load specified locale then check for fallbacks when directory is specified in load()
sourceMap[locale] = source + '/' + locale + '.json';
fallbackLocales = ( $.i18n.fallbacks[locale] || [] )
.concat( this.options.fallbackLocale );
for ( locIndex in fallbackLocales ) {