Upgrade jquery.i18n library from v1.0.2 to v1.0.3
Change-Id: Ia1d346f38180a11602bbac66755cb36f98b98948
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user