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
26 lines
2.6 KiB
JavaScript
26 lines
2.6 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) {
|
||
if (n === 1) return 1;
|
||
return 5;
|
||
}
|
||
global.ng.common.locales['es-uy'] = ['es-UY',[['a. m.','p. m.'],u,u],u,[['d','l','m','m','j','v','s'],['dom.','lun.','mar.','mié.','jue.','vie.','sáb.'],['domingo','lunes','martes','miércoles','jueves','viernes','sábado'],['DO','LU','MA','MI','JU','VI','SA']],[['D','L','M','M','J','V','S'],['dom.','lun.','mar.','mié.','jue.','vie.','sáb.'],['domingo','lunes','martes','miércoles','jueves','viernes','sábado'],['DO','LU','MA','MI','JU','VI','SA']],[['E','F','M','A','M','J','J','A','S','O','N','D'],['ene.','feb.','mar.','abr.','may.','jun.','jul.','ago.','set.','oct.','nov.','dic.'],['enero','febrero','marzo','abril','mayo','junio','julio','agosto','setiembre','octubre','noviembre','diciembre']],[['E','F','M','A','M','J','J','A','S','O','N','D'],['Ene.','Feb.','Mar.','Abr.','May.','Jun.','Jul.','Ago.','Set.','Oct.','Nov.','Dic.'],['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Setiembre','Octubre','Noviembre','Diciembre']],[['a. C.','d. C.'],u,['antes de Cristo','después de Cristo']],1,[6,0],['d/M/yy','d MMM y','d \'de\' MMMM \'de\' y','EEEE, d \'de\' MMMM \'de\' y'],['HH:mm','HH:mm:ss','HH:mm:ss z','HH:mm:ss zzzz'],['{1} {0}',u,'{1} \'a\' \'las\' {0}',u],[',','.',';','%','+','-','E','×','‰','∞','NaN',':'],['#,##0.###','#,##0 %','¤ #,##0.00','#E0'],'UYU','$','peso uruguayo',{'AUD':[u,'$'],'BRL':[u,'R$'],'CAD':[u,'$'],'CNY':[u,'¥'],'ESP':['₧'],'EUR':[u,'€'],'FKP':[u,'FK£'],'GBP':[u,'£'],'HKD':[u,'$'],'ILS':[u,'₪'],'INR':[u,'₹'],'JPY':[u,'¥'],'KRW':[u,'₩'],'MXN':[u,'$'],'NZD':[u,'$'],'RON':[u,'L'],'SSP':[u,'SD£'],'SYP':[u,'S£'],'TWD':[u,'NT$'],'USD':['US$','$'],'UYU':['$'],'UYW':['UP'],'VEF':[u,'BsF'],'VND':[u,'₫'],'XAF':[],'XCD':[u,'$'],'XOF':[]},'ltr', plural, [[['del mediodía','de la madrugada','de la mañana','de la tarde','de la noche'],u,u],[['mediodía','madrugada','mañana','tarde','noche'],u,u],['12:00',['00:00','06:00'],['06:00','12:00'],['12:00','20:00'],['20:00','24:00']]]];
|
||
})(
|
||
typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global ||
|
||
typeof window !== 'undefined' && window);
|