diff --git a/client/galaxy/scripts/i18n.js b/client/galaxy/scripts/i18n.js index f717cbcc3db..1bd688d12df 100644 --- a/client/galaxy/scripts/i18n.js +++ b/client/galaxy/scripts/i18n.js @@ -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(); diff --git a/static/maps/i18n.js.map b/static/maps/i18n.js.map index bcf4e5597a2..2ec1e73bdbd 100644 --- a/static/maps/i18n.js.map +++ b/static/maps/i18n.js.map @@ -1 +1 @@ -{"version":3,"sources":["i18n.js"],"names":["addPart","locale","master","needed","toLoad","prefix","suffix","push","addIfExists","req","fullName","require","toUrl","mixin","target","source","force","prop","hasOwnProperty","_typeof","nlsRegExp","masterConfig","module","config","version","load","i","part","name","match","parts","split","value","current","masterName","navigator","language","userLanguage","toLowerCase","isBuild","length","partBundle","onLoad"],"mappings":"0PAoCA,WAKI,SAAAA,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACAJ,EAAAD,KACAE,EAAAI,KAAAN,IACA,IAAAC,EAAAD,IAAA,IAAAC,EAAAD,IAUYG,EAAOG,KAAKF,EAASJ,EAAS,IAAMK,IALhD,SAAAE,EAAAC,EAAAR,EAAAG,EAAAC,EAAAC,GACA,IAAAI,EAASV,EAATC,EAAiCE,IAAjCG,EACIK,QAAIT,YAAgBO,EAAAG,MAAAF,EAAA,SAChBP,EAAAA,KAAOI,GAWV,SAAAM,EAAAC,EAAAC,EAAAC,GACJ,IAAAC,EAWG,IAAKA,KAAQF,GAELA,EAAOG,eAAeD,IACpBH,EAAOI,eAAeD,KAASD,EAGF,WAAxBG,EAAOJ,EAAOE,OAChBH,EAAOG,IAASF,EAAOE,KAT/BJ,EAAMC,OAEXD,EAAAC,EAAaC,GAAQA,EAAAE,GAAAD,IAK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ACHa,EAAAvB,EAAAqC,OAAA,EAXGd,GAAK,GAAKvB,EAAOuB,GAarBA,KAIX,KA1CGe,EAAAvC,EAqBIyB,EAAAxB,EAAAuB,MAqBP,IAAAe,IACJA,EAAAhC,EA3GLJ,EAAAsB,EAAA,IAAArB,IAmGwBO,EAAMmB,EAAOS,GAIjBC,EAAOV,WAhKnC","file":"../scripts/i18n.js","sourcesContent":["/**\n * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/i18n for details\n */\n/*jslint regexp: true */\n/*global require: false, navigator: false, define: false */\n\n/**\n * This plugin handles i18n! prefixed modules. It does the following:\n *\n * 1) A regular module can have a dependency on an i18n bundle, but the regular\n * module does not want to specify what locale to load. So it just specifies\n * the top-level bundle, like \"i18n!nls/colors\".\n *\n * This plugin will load the i18n bundle at nls/colors, see that it is a root/master\n * bundle since it does not have a locale in its name. It will then try to find\n * the best match locale available in that master bundle, then request all the\n * locale pieces for that best match locale. For instance, if the locale is \"en-us\",\n * then the plugin will ask for the \"en-us\", \"en\" and \"root\" bundles to be loaded\n * (but only if they are specified on the master bundle).\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/colors bundle to be that mixed in locale.\n *\n * 2) A regular module specifies a specific locale to load. For instance,\n * i18n!nls/fr-fr/colors. In this case, the plugin needs to load the master bundle\n * first, at nls/colors, then figure out what the best match locale is for fr-fr,\n * since maybe only fr or just root is defined for that locale. Once that best\n * fit is found, all of its locale pieces need to have their bundles loaded.\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/fr-fr/colors bundle to be that mixed in locale.\n */\n(function() {\n \"use strict\";\n\n //regexp for reconstructing the master bundle name from parts of the regexp match\n //nlsRegExp.exec(\"foo/bar/baz/nls/en-ca/foo\") gives:\n //[\"foo/bar/baz/nls/en-ca/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"en-ca\", \"foo\"]\n //nlsRegExp.exec(\"foo/bar/baz/nls/foo\") gives:\n //[\"foo/bar/baz/nls/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"foo\", \"\"]\n //so, if match[5] is blank, it means this is the top bundle definition.\n var nlsRegExp = /(^.*(^|\\/)nls(\\/|$))([^\\/]*)\\/?([^\\/]*)/;\n\n //Helper function to avoid repeating code. Lots of arguments in the\n //desire to stay functional and support RequireJS contexts without having\n //to know about the RequireJS contexts.\n function addPart(locale, master, needed, toLoad, prefix, suffix) {\n if (master[locale]) {\n needed.push(locale);\n if (master[locale] === true || master[locale] === 1) {\n toLoad.push(prefix + locale + \"/\" + suffix);\n }\n }\n }\n\n function addIfExists(req, locale, toLoad, prefix, suffix) {\n var fullName = prefix + locale + \"/\" + suffix;\n if (require._fileExists(req.toUrl(fullName + \".js\"))) {\n toLoad.push(fullName);\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n * This is not robust in IE for transferring methods that match\n * Object.prototype names, but the uses of mixin here seem unlikely to\n * trigger a problem related to that.\n */\n function mixin(target, source, force) {\n var prop;\n for (prop in source) {\n if (\n source.hasOwnProperty(prop) &&\n (!target.hasOwnProperty(prop) || force)\n ) {\n target[prop] = source[prop];\n } else if (typeof source[prop] === \"object\") {\n if (!target[prop] && source[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], source[prop], force);\n }\n }\n }\n\n define([\"module\"], function(module) {\n var masterConfig = module.config ? module.config() : {};\n\n return {\n version: \"2.0.4\",\n /**\n * Called when a dependency needs to be loaded.\n */\n load: function(name, req, onLoad, config) {\n config = config || {};\n\n if (config.locale) {\n masterConfig.locale = config.locale;\n }\n\n var masterName,\n match = nlsRegExp.exec(name),\n prefix = match[1],\n locale = match[4],\n suffix = match[5],\n parts = locale.split(\"-\"),\n toLoad = [],\n value = {},\n i,\n part,\n current = \"\";\n\n //If match[5] is blank, it means this is the top bundle definition,\n //so it does not have to be handled. Locale-specific requests\n //will have a match[4] value but no match[5]\n if (match[5]) {\n //locale-specific bundle\n prefix = match[1];\n masterName = prefix + suffix;\n } else {\n //Top-level bundle.\n masterName = name;\n suffix = match[4];\n locale = masterConfig.locale;\n if (!locale) {\n locale = masterConfig.locale =\n typeof navigator === \"undefined\"\n ? \"root\"\n : (navigator.language ||\n navigator.userLanguage ||\n \"root\"\n ).toLowerCase();\n }\n parts = locale.split(\"-\");\n }\n\n if (config.isBuild) {\n //Check for existence of all locale possible files and\n //require them if exist.\n toLoad.push(masterName);\n addIfExists(req, \"root\", toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addIfExists(req, current, toLoad, prefix, suffix);\n }\n\n req(toLoad, function() {\n onLoad();\n });\n } else {\n //First, fetch the master bundle, it knows what locales are available.\n req([masterName], function(master) {\n //Figure out the best fit\n var needed = [],\n part;\n\n //Always allow for root, then do the rest of the locale parts.\n addPart(\"root\", master, needed, toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addPart(\n current,\n master,\n needed,\n toLoad,\n prefix,\n suffix\n );\n }\n\n //Load all the parts missing.\n req(toLoad, function() {\n var i, partBundle, part;\n for (\n i = needed.length - 1;\n i > -1 && needed[i];\n i--\n ) {\n part = needed[i];\n partBundle = master[part];\n if (partBundle === true || partBundle === 1) {\n partBundle = req(\n prefix + part + \"/\" + suffix\n );\n }\n mixin(value, partBundle);\n }\n\n //All done, notify the loader.\n onLoad(value);\n });\n });\n }\n }\n };\n });\n})();\n"]} \ No newline at end of file +{"version":3,"sources":["i18n.js"],"names":["addPart","locale","master","needed","toLoad","prefix","suffix","push","addIfExists","req","fullName","require","toUrl","mixin","target","source","force","prop","hasOwnProperty","_typeof","nlsRegExp","masterConfig","module","config","version","load","i","part","name","match","parts","split","value","current","masterName","navigator","languages","userLanguage","toLow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IACSf,UAAapB,UACTkC,UAAAE,cACAhB,QASZiB,eAEJR,EAAA7B,EAAA8B,MAAA,MAGGR,EAAAgB,QAAA,CAKIZ,IAFJnB,EAAAA,KAAAA,GACAA,EAAKkB,EAAOA,OAAII,EAAhBzB,EAAmCC,GAC/BqB,EAAAA,EAAAA,EAAOG,EAAAU,OAAPd,IACAO,EAAAA,EAAAA,GAEHzB,EAAAC,EADGD,IAAAA,EAAiByB,IAAjB,IAA0B7B,EAC7BA,EAAAC,EAAAC,GAGGmC,EAAAA,EAAAA,WACHA,WAIGhC,GAAAyB,GAAA,SAAAhC,GACA,IACIyB,EADJxB,KAMIwB,IADJ3B,EAAA,OAAY0B,EAAII,EAAhB1B,EAAmCC,EAAAC,GAC/BqB,EAAAA,EAAAA,EAAOG,EAAAU,OAAPd,IACAO,EAAAA,EAAAA,GASHjC,EARGA,IACIiC,EACA/B,IAFJ,IAGIC,EAORD,EACIE,EACAA,EACAC,EAKIsB,GAOAd,EAAAA,EAAAA,WACH,IAAAa,EAAAgB,EAAAf,EAbD,IAeAD,EAAAvB,EAAAqC,OAAA,EACAC,GAAAA,GAAOT,EAAPN,GAlBJA,KAvFhB,KA6GKgB,EAAAxC,EADIyB,EAAAxB,EAAAuB,MA5GT,IAAAgB,IAHJA,EAAAjC,EAtDJJ,EAAAsB,EAAA,IAAArB,IA8JgCO,EAAMmB,EAAOU,GAIjBD,EAAOT,WAlKnC","file":"../scripts/i18n.js","sourcesContent":["/**\n * @license i18n 2.0.6 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, http://github.com/requirejs/i18n/LICENSE\n */\n/*jslint regexp: true */\n/*global require: false, navigator: false, define: false */\n\n/**\n * This plugin handles i18n! prefixed modules. It does the following:\n *\n * 1) A regular module can have a dependency on an i18n bundle, but the regular\n * module does not want to specify what locale to load. So it just specifies\n * the top-level bundle, like 'i18n!nls/colors'.\n *\n * This plugin will load the i18n bundle at nls/colors, see that it is a root/master\n * bundle since it does not have a locale in its name. It will then try to find\n * the best match locale available in that master bundle, then request all the\n * locale pieces for that best match locale. For instance, if the locale is 'en-us',\n * then the plugin will ask for the 'en-us', 'en' and 'root' bundles to be loaded\n * (but only if they are specified on the master bundle).\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/colors bundle to be that mixed in locale.\n *\n * 2) A regular module specifies a specific locale to load. For instance,\n * i18n!nls/fr-fr/colors. In this case, the plugin needs to load the master bundle\n * first, at nls/colors, then figure out what the best match locale is for fr-fr,\n * since maybe only fr or just root is defined for that locale. Once that best\n * fit is found, all of its locale pieces need to have their bundles loaded.\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/fr-fr/colors bundle to be that mixed in locale.\n */\n(function() {\n \"use strict\";\n\n //regexp for reconstructing the master bundle name from parts of the regexp match\n //nlsRegExp.exec('foo/bar/baz/nls/en-ca/foo') gives:\n //['foo/bar/baz/nls/en-ca/foo', 'foo/bar/baz/nls/', '/', '/', 'en-ca', 'foo']\n //nlsRegExp.exec('foo/bar/baz/nls/foo') gives:\n //['foo/bar/baz/nls/foo', 'foo/bar/baz/nls/', '/', '/', 'foo', '']\n //so, if match[5] is blank, it means this is the top bundle definition.\n var nlsRegExp = /(^.*(^|\\/)nls(\\/|$))([^\\/]*)\\/?([^\\/]*)/;\n\n //Helper function to avoid repeating code. Lots of arguments in the\n //desire to stay functional and support RequireJS contexts without having\n //to know about the RequireJS contexts.\n function addPart(locale, master, needed, toLoad, prefix, suffix) {\n if (master[locale]) {\n needed.push(locale);\n if (master[locale] === true || master[locale] === 1) {\n toLoad.push(prefix + locale + \"/\" + suffix);\n }\n }\n }\n\n function addIfExists(req, locale, toLoad, prefix, suffix) {\n var fullName = prefix + locale + \"/\" + suffix;\n if (require._fileExists(req.toUrl(fullName + \".js\"))) {\n toLoad.push(fullName);\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n * This is not robust in IE for transferring methods that match\n * Object.prototype names, but the uses of mixin here seem unlikely to\n * trigger a problem related to that.\n */\n function mixin(target, source, force) {\n var prop;\n for (prop in source) {\n if (\n source.hasOwnProperty(prop) &&\n (!target.hasOwnProperty(prop) || force)\n ) {\n target[prop] = source[prop];\n } else if (typeof source[prop] === \"object\") {\n if (!target[prop] && source[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], source[prop], force);\n }\n }\n }\n\n define([\"module\"], function(module) {\n var masterConfig = module.config ? module.config() : {};\n\n return {\n version: \"2.0.6\",\n /**\n * Called when a dependency needs to be loaded.\n */\n load: function(name, req, onLoad, config) {\n config = config || {};\n\n if (config.locale) {\n masterConfig.locale = config.locale;\n }\n\n var masterName,\n match = nlsRegExp.exec(name),\n prefix = match[1],\n locale = match[4],\n suffix = match[5],\n parts = locale.split(\"-\"),\n toLoad = [],\n value = {},\n i,\n part,\n current = \"\";\n\n //If match[5] is blank, it means this is the top bundle definition,\n //so it does not have to be handled. Locale-specific requests\n //will have a match[4] value but no match[5]\n if (match[5]) {\n //locale-specific bundle\n prefix = match[1];\n masterName = prefix + suffix;\n } else {\n //Top-level bundle.\n masterName = name;\n suffix = match[4];\n locale = masterConfig.locale;\n if (!locale) {\n locale = masterConfig.locale =\n typeof navigator === \"undefined\"\n ? \"root\"\n : ((navigator.languages &&\n navigator.languages[0]) ||\n navigator.language ||\n navigator.userLanguage ||\n \"root\"\n ).toLowerCase();\n }\n parts = locale.split(\"-\");\n }\n\n if (config.isBuild) {\n //Check for existence of all locale possible files and\n //require them if exist.\n toLoad.push(masterName);\n addIfExists(req, \"root\", toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addIfExists(req, current, toLoad, prefix, suffix);\n }\n\n req(toLoad, function() {\n onLoad();\n });\n } else {\n //First, fetch the master bundle, it knows what locales are available.\n req([masterName], function(master) {\n //Figure out the best fit\n var needed = [],\n part;\n\n //Always allow for root, then do the rest of the locale parts.\n addPart(\"root\", master, needed, toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addPart(\n current,\n master,\n needed,\n toLoad,\n prefix,\n suffix\n );\n }\n\n //Load all the parts missing.\n req(toLoad, function() {\n var i, partBundle, part;\n for (\n i = needed.length - 1;\n i > -1 && needed[i];\n i--\n ) {\n part = needed[i];\n partBundle = master[part];\n if (partBundle === true || partBundle === 1) {\n partBundle = req(\n prefix + part + \"/\" + suffix\n );\n }\n mixin(value, partBundle);\n }\n\n //All done, notify the loader.\n onLoad(value);\n });\n });\n }\n }\n };\n });\n})();\n"]} \ No newline at end of file diff --git a/static/scripts/i18n.js b/static/scripts/i18n.js index 94ace4ec4d0..529facf1d86 100644 --- a/static/scripts/i18n.js +++ b/static/scripts/i18n.js @@ -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-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-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