You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Copy file name to clipboardexpand all lines: tools/Ldml2Json.js
+10-3
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,9 @@ var
17
17
spawn=require('child_process').spawn,
18
18
fs=require('fs'),
19
19
20
+
copyright='This file is a modified form of the Unicode CLDR data found at http://www.unicode.org/cldr/data/.\n\nCOPYRIGHT AND PERMISSION NOTICE\n\nCopyright (c) 1991-2013 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html.',
21
+
copyrightJsonp='/'+'*\n'+copyright+'\n*'+'/\n',
22
+
20
23
// The 'callback' function for the JSONP files
21
24
jsonpFn='Intl.__addLocaleData',
22
25
@@ -126,7 +129,7 @@ function cldrToIntl() {
126
129
base;
127
130
128
131
locales.forEach(function(dir){
129
-
varjson,obj;
132
+
varjson,obj,objCopy;
130
133
131
134
// The Ldml2JsonConverter tool creats directories even for locales that have
132
135
// no data that we require
@@ -151,10 +154,14 @@ function cldrToIntl() {
151
154
// Process our object into a format that can easily be parsed by Intl.js
152
155
obj=processObj(obj);
153
156
157
+
// We only want to embed the copyright in the json file (not jsonp).
0 commit comments