mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
(fix) Datepicker: Use Globalize 1.0.0
- Update Globalize to 1.0.0-alpha.7
This commit is contained in:
parent
5d044dd88c
commit
7f432eddb0
@ -283,7 +283,6 @@ grunt.initConfig({
|
||||
|
||||
"globalize/globalize.js": "globalize/dist/globalize.js",
|
||||
"globalize/globalize/date.js": "globalize/dist/globalize/date.js",
|
||||
"globalize/globalize/message.js": "globalize/dist/globalize/message.js",
|
||||
"globalize/LICENSE.txt": "globalize/LICENSE.txt",
|
||||
|
||||
"qunit/qunit.js": "qunit/qunit/qunit.js",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"jquery-simulate": "1.0.0",
|
||||
"jshint": "2.4.4",
|
||||
"qunit": "1.17.1",
|
||||
"globalize": "1.0.0-alpha.6",
|
||||
"globalize": "1.0.0-alpha.7",
|
||||
|
||||
"jquery-1.7.0": "jquery#1.7.0",
|
||||
"jquery-1.7.1": "jquery#1.7.1",
|
||||
|
4
external/globalize/globalize.js
vendored
4
external/globalize/globalize.js
vendored
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Globalize v1.0.0-alpha.6
|
||||
* Globalize v1.0.0-alpha.7
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
@ -7,7 +7,7 @@
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-09-01T21:32Z
|
||||
* Date: 2014-09-30T12:31Z
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
|
940
external/globalize/globalize/date.js
vendored
940
external/globalize/globalize/date.js
vendored
File diff suppressed because it is too large
Load Diff
86
external/globalize/globalize/message.js
vendored
86
external/globalize/globalize/message.js
vendored
@ -1,86 +0,0 @@
|
||||
/*!
|
||||
* Globalize v1.0.0-alpha.6
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright 2010, 2014 jQuery Foundation, Inc. and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-09-01T21:32Z
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
// UMD returnExports
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD
|
||||
define([
|
||||
"cldr",
|
||||
"../globalize"
|
||||
], factory );
|
||||
} else if ( typeof exports === "object" ) {
|
||||
|
||||
// Node, CommonJS
|
||||
module.exports = factory( require( "cldrjs" ), require( "globalize" ) );
|
||||
} else {
|
||||
|
||||
// Extend global
|
||||
factory( root.Cldr, root.Globalize );
|
||||
}
|
||||
}(this, function( Cldr, Globalize ) {
|
||||
|
||||
var alwaysArray = Globalize._alwaysArray,
|
||||
validateDefaultLocale = Globalize._validateDefaultLocale,
|
||||
validateParameterPresence = Globalize._validateParameterPresence,
|
||||
validateParameterType = Globalize._validateParameterType,
|
||||
validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;
|
||||
|
||||
|
||||
/**
|
||||
* .loadTranslations( json )
|
||||
*
|
||||
* @json [JSON]
|
||||
*
|
||||
* Load translation data.
|
||||
*/
|
||||
Globalize.loadTranslations = function( json ) {
|
||||
var customData = {
|
||||
"globalize-translations": json
|
||||
};
|
||||
|
||||
validateParameterPresence( json, "json" );
|
||||
validateParameterTypePlainObject( json, "json" );
|
||||
|
||||
Cldr.load( customData );
|
||||
};
|
||||
|
||||
/**
|
||||
* .translate( path )
|
||||
*
|
||||
* @path [String or Array]
|
||||
*
|
||||
* Translate item given its path.
|
||||
*/
|
||||
Globalize.translate =
|
||||
Globalize.prototype.translate = function( path ) {
|
||||
var cldr;
|
||||
|
||||
validateParameterPresence( path, "path" );
|
||||
validateParameterType( path, "path", typeof path === "string" || Array.isArray( path ),
|
||||
"a String nor an Array" );
|
||||
|
||||
path = alwaysArray( path );
|
||||
cldr = this.cldr;
|
||||
|
||||
validateDefaultLocale( cldr );
|
||||
|
||||
return cldr.get( [ "globalize-translations/{languageId}" ].concat( path ) );
|
||||
};
|
||||
|
||||
return Globalize;
|
||||
|
||||
|
||||
|
||||
|
||||
}));
|
Loading…
Reference in New Issue
Block a user