Minor bump to i18n.js; probably not the fix I'm looking for though.

This commit is contained in:
Dannon Baker
2017-10-26 13:32:47 -04:00
parent 66d0da6d70
commit 5ec7f9ea9c
3 changed files with 15 additions and 14 deletions
+13 -12
View File
@@ -1,7 +1,6 @@
/**
* @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/i18n for details
* @license i18n 2.0.6 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/i18n/LICENSE
*/
/*jslint regexp: true */
/*global require: false, navigator: false, define: false */
@@ -11,13 +10,13 @@
*
* 1) A regular module can have a dependency on an i18n bundle, but the regular
* module does not want to specify what locale to load. So it just specifies
* the top-level bundle, like "i18n!nls/colors".
* the top-level bundle, like 'i18n!nls/colors'.
*
* This plugin will load the i18n bundle at nls/colors, see that it is a root/master
* bundle since it does not have a locale in its name. It will then try to find
* the best match locale available in that master bundle, then request all the
* locale pieces for that best match locale. For instance, if the locale is "en-us",
* then the plugin will ask for the "en-us", "en" and "root" bundles to be loaded
* locale pieces for that best match locale. For instance, if the locale is 'en-us',
* then the plugin will ask for the 'en-us', 'en' and 'root' bundles to be loaded
* (but only if they are specified on the master bundle).
*
* Once all the bundles for the locale pieces load, then it mixes in all those
@@ -38,10 +37,10 @@
"use strict";
//regexp for reconstructing the master bundle name from parts of the regexp match
//nlsRegExp.exec("foo/bar/baz/nls/en-ca/foo") gives:
//["foo/bar/baz/nls/en-ca/foo", "foo/bar/baz/nls/", "/", "/", "en-ca", "foo"]
//nlsRegExp.exec("foo/bar/baz/nls/foo") gives:
//["foo/bar/baz/nls/foo", "foo/bar/baz/nls/", "/", "/", "foo", ""]
//nlsRegExp.exec('foo/bar/baz/nls/en-ca/foo') gives:
//['foo/bar/baz/nls/en-ca/foo', 'foo/bar/baz/nls/', '/', '/', 'en-ca', 'foo']
//nlsRegExp.exec('foo/bar/baz/nls/foo') gives:
//['foo/bar/baz/nls/foo', 'foo/bar/baz/nls/', '/', '/', 'foo', '']
//so, if match[5] is blank, it means this is the top bundle definition.
var nlsRegExp = /(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;
@@ -92,7 +91,7 @@
var masterConfig = module.config ? module.config() : {};
return {
version: "2.0.4",
version: "2.0.6",
/**
* Called when a dependency needs to be loaded.
*/
@@ -131,7 +130,9 @@
locale = masterConfig.locale =
typeof navigator === "undefined"
? "root"
: (navigator.language ||
: ((navigator.languages &&
navigator.languages[0]) ||
navigator.language ||
navigator.userLanguage ||
"root"
).toLowerCase();
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define("i18n",[],function(){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function n(o,n,t,e,r,i){n[o]&&(t.push(o),!0!==n[o]&&1!==n[o]||e.push(r+o+"/"+i))}function t(o,n,t,e,r){var i=e+n+"/"+r;require._fileExists(o.toUrl(i+".js"))&&t.push(i)}function e(n,t,r){var i;for(i in t)!t.hasOwnProperty(i)||n.hasOwnProperty(i)&&!r?"object"===o(t[i])&&(!n[i]&&t[i]&&(n[i]={}),e(n[i],t[i],r)):n[i]=t[i]}var r=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define(["module"],function(o){var i=o.config?o.config():{};return{version:"2.0.4",load:function(o,f,l,u){(u=u||{}).locale&&(i.locale=u.locale);var a,c,s,p=r.exec(o),y=p[1],g=p[4],v=p[5],h=g.split("-"),b=[],m={},d="";if(p[5]?a=(y=p[1])+v:(a=o,v=p[4],(g=i.locale)||(g=i.locale="undefined"==typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),h=g.split("-")),u.isBuild){for(b.push(a),t(f,"root",b,y,v),c=0;c<h.length;c++)s=h[c],t(f,d+=(d?"-":"")+s,b,y,v);f(b,function(){l()})}else f([a],function(o){var t,r=[];for(n("root",o,r,b,y,v),c=0;c<h.length;c++)t=h[c],n(d+=(d?"-":"")+t,o,r,b,y,v);f(b,function(){var n,t,i;for(n=r.length-1;n>-1&&r[n];n--)!0!==(t=o[i=r[n]])&&1!==t||(t=f(y+i+"/"+v)),e(m,t);l(m)})})}}})}()});
define("i18n",[],function(){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function n(o,n,t,e,r,i){n[o]&&(t.push(o),!0!==n[o]&&1!==n[o]||e.push(r+o+"/"+i))}function t(o,n,t,e,r){var i=e+n+"/"+r;require._fileExists(o.toUrl(i+".js"))&&t.push(i)}function e(n,t,r){var i;for(i in t)!t.hasOwnProperty(i)||n.hasOwnProperty(i)&&!r?"object"===o(t[i])&&(!n[i]&&t[i]&&(n[i]={}),e(n[i],t[i],r)):n[i]=t[i]}var r=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define(["module"],function(o){var i=o.config?o.config():{};return{version:"2.0.6",load:function(o,a,l,u){(u=u||{}).locale&&(i.locale=u.locale);var f,c,s,g=r.exec(o),p=g[1],y=g[4],v=g[5],h=y.split("-"),b=[],m={},d="";if(g[5]?f=(p=g[1])+v:(f=o,v=g[4],(y=i.locale)||(y=i.locale="undefined"==typeof navigator?"root":(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"root").toLowerCase()),h=y.split("-")),u.isBuild){for(b.push(f),t(a,"root",b,p,v),c=0;c<h.length;c++)s=h[c],t(a,d+=(d?"-":"")+s,b,p,v);a(b,function(){l()})}else a([f],function(o){var t,r=[];for(n("root",o,r,b,p,v),c=0;c<h.length;c++)t=h[c],n(d+=(d?"-":"")+t,o,r,b,p,v);a(b,function(){var n,t,i;for(n=r.length-1;n>-1&&r[n];n--)!0!==(t=o[i=r[n]])&&1!==t||(t=a(p+i+"/"+v)),e(m,t);l(m)})})}}})}()});
//# sourceMappingURL=../maps/i18n.js.map