GitHub PullRequestReviewCommentEvent at 2014-04-14 16:25:42
Repository: ecma402
Actor: wajnberg
Payload: {"comment":{"url":"https://api.github.com/repos/ibm-js/ecma402/pulls/comments/11593289","id":11593289,"diff_hunk":"@@ -1,1725 +1,1253 @@\n-define(\n-\t[ \"dojo/request\", \"./calendars\", \"./Record\", \"./List\" ],\n-\tfunction(request, calendars, Record, List) {\n-\t\t//\n-\t\t// JavaScript implementation of Internationalization APIs as defined in ECMA standard 402 version 1.0\n-\t\t//\n-\t\t\n-\t\tvar unicodeLocaleExtensions = /-u(-[a-z0-9]{2,8})+/g;\n-\t\tvar dateTimeProperties = [ \"weekday\", \"era\", \"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"timeZoneName\" ];\n-\t\tvar availableLocalesList = CanonicalizeLocaleList(getCLDRJson(\"config\", \"availableLocales\").availableLocales);\n-\t\tvar aliases = getCLDRJson(\"supplemental\", \"aliases\").supplemental.metadata.alias;\n-\t\tvar localeAliases = getCLDRJson(\"supplemental\", \"localeAliases\").supplemental.metadata.alias;\n-\t\tvar parentLocales = getCLDRJson(\"supplemental\", \"parentLocales\").supplemental.parentLocales;\n-\t\tvar currencyData = getCLDRJson(\"supplemental\", \"currencyData\").supplemental.currencyData.fractions;\n-\t\tvar timeData = getCLDRJson(\"supplemental\", \"timeData\").supplemental.timeData;\n-\t\tvar likelySubtags = getCLDRJson(\"supplemental\", \"likelySubtags\").supplemental.likelySubtags;\n-\t\tvar numberingSystems = getCLDRJson(\"supplemental\", \"numberingSystems\").supplemental.numberingSystems;\n-\t\tvar availableNumberingSystems = [ \"latn\" ];\n-\t\tfor( var ns in numberingSystems){\n-\t\t\tif(numberingSystems[ns]._type==\"numeric\"&&ns!=\"latn\"){\n-\t\t\t\tavailableNumberingSystems.push(ns);\n-\t\t\t}\n-\t\t}\n-\n-\t\t// Utility function for Synchronous JSON loading using Dojo require.\n-\t\tfunction getCLDRJson(locale, path) {\n-\t\t\tvar result = undefined;\n-\t\t\tvar url = require.toUrl(\"ecma402/cldr/\"+locale+\"/\"+path+\".json\");\n-\t\t\tvar options = {\n-\t\t\t\tsync : true,\n-\t\t\t\thandleAs : \"json\"\n-\t\t\t};\n-\t\t\trequest(url, options).then(function(data) {\n-\t\t\t\tresult = data;\n-\t\t\t}, function(error) {\n-\t\t\t\tresult = null;\n-\t\t\t});\n-\t\t\treturn result;\n-\t\t}\n-\n-\t\t// ECMA 402 Section 6.1\n-\t\tfunction _toUpperCaseIdentifier(/* String */identifier) {\n-\t\t\tvar match = /[a-z]/g;\n-\t\t\treturn identifier.replace(match, function(m) {\n-\t\t\t\treturn m.toUpperCase();\n-\t\t\t}); // String\n-\t\t}\n+/* JavaScript implementation of Internationalization APIs as defined in ECMA standard 402 version 1.0 */\n+require.config({\n+\tbaseUrl : \"/ecma402\",\n+\tpaths : {\n+\t\t\"require\" : \"/ecma402/requirejs/require\",\n+\t\t\"text\" : \"/ecma402/requirejs/text\",\n+\t\t\"json\" : \"/ecma402/requirejs/json\"\n+\t},\n+\tshim : {\n+\t\t'Intl' : [ 'locales' ],\n+\t\t'preloads' : [ 'locales' ]\n+\t},\n+\twaitSeconds : 0\n+});\n \n-\t\t// ECMA 402 Section 6.1\n-\t\tfunction _toLowerCaseIdentifier(/* String */identifier) {\n-\t\t\tvar match = /[A-Z]/g;\n-\t\t\treturn identifier.replace(match, function(m) {\n-\t\t\t\treturn m.toLowerCase();\n-\t\t\t}); // String\n-\t\t}\n-\n-\t\t// ECMA 402 Section 6.2.2\n-\t\tfunction IsStructurallyValidLanguageTag(/* String */locale) {\n-\t\t\tif(typeof locale!==\"string\"){\n-\t\t\t\treturn false; // Boolean\n-\t\t\t}\n-\t\t\tvar identifier = _toLowerCaseIdentifier(locale);\n-\t\t\tvar langtag = /^([a-z]{2,3}(-[a-z]{3}){0,3}|[a-z]{4,8})(-[a-z]{4})?(-([a-z]{2}|\\d{3}))?(-([a-z0-9]{5,8}|\\d[a-z0-9]{3}))*(-[a-wyz0-9](-[a-z0-9]{2,8})+)*(-x(-[a-z0-9]{1,8})+)?$/;\n-\t\t\tvar privateuse = /x(-[a-z0-9]{1,8})+/;\n-\t\t\tvar grandfathered = /en-gb-oed|(i-(ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu))|sgn-((be-(fr|nl))|(ch-de))/;\n-\t\t\tif(privateuse.test(identifier)||grandfathered.test(identifier)){\n-\t\t\t\treturn true; // Boolean\n-\t\t\t}\n-\n-\t\t\tfunction _isUniqueVariant(element, index, array) {\n-\t\t\t\tvar firstSingletonPosition = identifier.search(/-[a-z0-9]-/);\n-\t\t\t\tif(firstSingletonPosition>0){\n-\t\t\t\t\treturn identifier.indexOf(element)>firstSingletonPosition\n-\t\t\t\t\t\t||identifier.indexOf(element)==identifier.lastIndexOf(element, firstSingletonPosition); // Boolean\n+define(\n+\t\t\"Intl\",","path":"Intl.js","position":90,"original_position":90,"commit_id":"95c84f3bb6e086ce14fbb6380969291e1a96277d","original_commit_id":"95c84f3bb6e086ce14fbb6380969291e1a96277d","user":{"login":"wajnberg","id":5575592,"avatar_url":"https://avatars.githubusercontent.com/u/5575592?","gravatar_id":"7d3bec7986a30891f74dc993c509cdf3","url":"https://api.github.com/users/wajnberg","html_url":"https://github.com/wajnberg","followers_url":"https://api.github.com/users/wajnberg/followers","following_url":"https://api.github.com/users/wajnberg/following{/other_user}","gists_url":"https://api.github.com/users/wajnberg/gists{/gist_id}","starred_url":"https://api.github.com/users/wajnberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wajnberg/subscriptions","organizations_url":"https://api.github.com/users/wajnberg/orgs","repos_url":"https://api.github.com/users/wajnberg/repos","events_url":"https://api.github.com/users/wajnberg/events{/privacy}","received_events_url":"https://api.github.com/users/wajnberg/received_events","type":"User","site_admin":false},"body":"\nI am out of the office until 04/23/2014.\n\nI will respond to your message when I return.\nFor emergency cases you can contact me on\n00 972 58 778 8079\n\n\nNote: This is an automated response to your message  \"Re: [ecma402]\nPreloading locales and IntlShim (#8)\" sent on 14/04/2014 16:52:32.\n\nThis is the only notification you will receive while this person is away.","created_at":"2014-04-14T16:25:42Z","updated_at":"2014-04-14T16:25:42Z","html_url":"https://github.com/ibm-js/ecma402/pull/8#discussion_r11593289","pull_request_url":"https://api.github.com/repos/ibm-js/ecma402/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/ibm-js/ecma402/pulls/comments/11593289"},"html":{"href":"https://github.com/ibm-js/ecma402/pull/8#discussion_r11593289"},"pull_request":{"href":"https://api.github.com/repos/ibm-js/ecma402/pulls/8"}}}}