Although this code has been part of Angular 9.x I only noticed this error when upgrading to Angular 9.1.x because historically the source locale data was not injected when localizing, but as of angular/angular-cli#16394 (9.1.0) it is now included. This tipped me off that my other bundles were not being built properly, and this change allows me to build a valid ES5 bundle (I have also added a verification step to my build pipeline to alert me if this error appears again in any of my bundles). I found the `locales/global/*.js` file paths being referenced by the `I18nOptions` in @angular-devkit/build-angular/src/utils/i18n-options.ts, and following that it looks like it is actually loaded and used in @angular-devkit/build-angular/src/utils/process-bundle.ts. I saw the function `terserMangle` does appear that it is likely aware of the build being ES5, but I'm not sure why this is not producing a valid ES5 bundle. This change updates `tools/gulp-tasks/cldr/extract.js` to produce ES5 compliant `locales/global/*.js` and that fixes my issue. However, I am not sure if @angular-devkit/build-angular should be modified to produce a valid ES5 bundle instead or if the files could be TypeScript rather than JavaScript files. A test that a valid ES5 bundle is produced would be helpful, and I hope this is reproducible and not some issue with my config. PR Close #36342
66 lines
2.0 KiB
JavaScript
66 lines
2.0 KiB
JavaScript
/**
|
||
* @license
|
||
* Copyright Google Inc. All Rights Reserved.
|
||
*
|
||
* Use of this source code is governed by an MIT-style license that can be
|
||
* found in the LICENSE file at https://angular.io/license
|
||
*/
|
||
|
||
// THIS CODE IS GENERATED - DO NOT MODIFY
|
||
// See angular/tools/gulp-tasks/cldr/extract.js
|
||
|
||
(function(global) {
|
||
global.ng = global.ng || {};
|
||
global.ng.common = global.ng.common || {};
|
||
global.ng.common.locales = global.ng.common.locales || {};
|
||
var u = undefined;
|
||
function plural(n) { return 5; }
|
||
global.ng.common.locales['ko-kp'] = [
|
||
'ko-KP',
|
||
[['AM', 'PM'], u, ['오전', '오후']],
|
||
u,
|
||
[
|
||
['일', '월', '화', '수', '목', '금', '토'], u,
|
||
['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
||
['일', '월', '화', '수', '목', '금', '토']
|
||
],
|
||
u,
|
||
[
|
||
[
|
||
'1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월',
|
||
'12월'
|
||
],
|
||
u, u
|
||
],
|
||
u,
|
||
[['BC', 'AD'], u, ['기원전', '서기']],
|
||
1,
|
||
[6, 0],
|
||
['yy. M. d.', 'y. M. d.', 'y년 M월 d일', 'y년 M월 d일 EEEE'],
|
||
['a h:mm', 'a h:mm:ss', 'a h시 m분 s초 z', 'a h시 m분 s초 zzzz'],
|
||
['{1} {0}', u, u, u],
|
||
['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
|
||
['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'],
|
||
'KPW',
|
||
'KPW',
|
||
'조선 민주주의 인민 공화국 원',
|
||
{
|
||
'AUD': ['AU$', '$'],
|
||
'JPY': ['JP¥', '¥'],
|
||
'RON': [u, 'L'],
|
||
'TWD': ['NT$'],
|
||
'USD': ['US$', '$']
|
||
},
|
||
'ltr',
|
||
plural,
|
||
[
|
||
[['자정', '정오', '새벽', '오전', '오후', '저녁', '밤'], u, u], u,
|
||
[
|
||
'00:00', '12:00', ['03:00', '06:00'], ['06:00', '12:00'], ['12:00', '18:00'],
|
||
['18:00', '21:00'], ['21:00', '03:00']
|
||
]
|
||
]
|
||
];
|
||
})(typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global ||
|
||
typeof window !== 'undefined' && window);
|