@@ -251,7 +251,7 @@ const i18nMsg = (message: string, placeholders: Placeholder[] = [], meta?: Meta)
251251 const closurePlaceholders = i18nPlaceholdersToString ( placeholders ) ;
252252 const locMessageWithPlaceholders = i18nMsgInsertLocalizePlaceholders ( message , placeholders ) ;
253253 return String . raw `
254- var ${ varName } ;
254+ let ${ varName } ;
255255 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
256256 ${ i18nMsgClosureMeta ( meta ) }
257257 const $MSG_EXTERNAL_${ msgIndex } $ = goog.getMsg("${ message } "${ closurePlaceholders } );
@@ -304,7 +304,7 @@ describe('i18n support in the template compiler', () => {
304304
305305 // Keeping this block as a raw string, since it checks escaping of special chars.
306306 const i18n_6 = String . raw `
307- var $i18n_23$;
307+ let $i18n_23$;
308308 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
309309 /**
310310 * @desc [BACKUP_$` +
@@ -321,7 +321,7 @@ describe('i18n support in the template compiler', () => {
321321
322322 // Keeping this block as a raw string, since it checks escaping of special chars.
323323 const i18n_7 = String . raw `
324- var $i18n_7$;
324+ let $i18n_7$;
325325 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
326326 /**
327327 * @desc Some text \' [BACKUP_MESSAGE_ID: xxx]
@@ -780,7 +780,7 @@ describe('i18n support in the template compiler', () => {
780780 $r3$.ɵɵelementEnd();
781781 }
782782 if (rf & 2) {
783- var $tmp_0_0$ = null;
783+ let $tmp_0_0$ = null;
784784 $r3$.ɵɵi18nExp(($tmp_0_0$ = ctx.valueA.getRawValue()) == null ? null : $tmp_0_0$.getTitle());
785785 $r3$.ɵɵi18nApply(1);
786786 }
@@ -942,7 +942,7 @@ describe('i18n support in the template compiler', () => {
942942 verify ( input , output ) ;
943943 } ) ;
944944
945- it ( 'should sanitize ids and generate proper var names' , ( ) => {
945+ it ( 'should sanitize ids and generate proper variable names' , ( ) => {
946946 const input = `
947947 <div i18n="@@ID.WITH.INVALID.CHARS.2" i18n-title="@@ID.WITH.INVALID.CHARS" title="Element title">
948948 Some content
@@ -951,7 +951,7 @@ describe('i18n support in the template compiler', () => {
951951
952952 // Keeping raw content (avoiding `i18nMsg`) to illustrate message id sanitization.
953953 const output = String . raw `
954- var $I18N_0$;
954+ let $I18N_0$;
955955 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
956956 const $MSG_EXTERNAL_ID_WITH_INVALID_CHARS$$APP_SPEC_TS_1$ = goog.getMsg("Element title");
957957 $I18N_0$ = $MSG_EXTERNAL_ID_WITH_INVALID_CHARS$$APP_SPEC_TS_1$;
@@ -960,7 +960,7 @@ describe('i18n support in the template compiler', () => {
960960 $I18N_0$ = $localize \`:@@ID.WITH.INVALID.CHARS:Element title\`;
961961 }
962962 …
963- var $I18N_2$;
963+ let $I18N_2$;
964964 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
965965 const $MSG_EXTERNAL_ID_WITH_INVALID_CHARS_2$$APP_SPEC_TS_4$ = goog.getMsg(" Some content ");
966966 $I18N_2$ = $MSG_EXTERNAL_ID_WITH_INVALID_CHARS_2$$APP_SPEC_TS_4$;
@@ -1018,7 +1018,7 @@ describe('i18n support in the template compiler', () => {
10181018
10191019 // Keeping raw content (avoiding `i18nMsg`) to illustrate quotes escaping.
10201020 const output = String . raw `
1021- var $I18N_0$;
1021+ let $I18N_0$;
10221022 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
10231023 const $MSG_EXTERNAL_4924931801512133405$$APP_SPEC_TS_0$ = goog.getMsg("Some text 'with single quotes', \"with double quotes\", ` +
10241024 '`with backticks`' + String . raw ` and without quotes.");
@@ -1036,7 +1036,7 @@ describe('i18n support in the template compiler', () => {
10361036 const input = '<div i18n>`{{ count }}`</div>' ;
10371037 // Keeping raw content (avoiding `i18nMsg`) to illustrate backticks escaping.
10381038 const output = String . raw `
1039- var $I18N_0$;
1039+ let $I18N_0$;
10401040 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
10411041 const $MSG_APP_SPEC_TS_1$ = goog.getMsg("` +
10421042 '`{$interpolation}`' + String . raw `", { "interpolation": "\uFFFD0\uFFFD" });
@@ -1108,7 +1108,7 @@ describe('i18n support in the template compiler', () => {
11081108 // Keeping raw content (avoiding `i18nMsg`) to illustrate how named interpolations are
11091109 // generated.
11101110 const i18n_0 = String . raw `
1111- var $I18N_0$;
1111+ let $I18N_0$;
11121112 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
11131113 const $MSG_EXTERNAL_7597881511811528589$$APP_SPEC_TS_0$ = goog.getMsg(" Named interpolation: {$phA} Named interpolation with spaces: {$phB} ", {
11141114 "phA": "\uFFFD0\uFFFD",
@@ -1209,7 +1209,7 @@ describe('i18n support in the template compiler', () => {
12091209 $r3$.ɵɵelementEnd();
12101210 }
12111211 if (rf & 2) {
1212- var $tmp_2_0$ = null;
1212+ let $tmp_2_0$ = null;
12131213 $r3$.ɵɵadvance(2);
12141214 $r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 3, ctx.valueA))
12151215 (ctx.valueA == null ? null : ctx.valueA.a == null ? null : ctx.valueA.a.b)
@@ -2487,7 +2487,7 @@ describe('i18n support in the template compiler', () => {
24872487 // Keeping raw content (avoiding `i18nMsg`) to illustrate message layout
24882488 // in case of whitespace preserving mode.
24892489 const i18n_0 = String . raw `
2490- var $I18N_0$;
2490+ let $I18N_0$;
24912491 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
24922492 const $MSG_EXTERNAL_963542717423364282$$APP_SPEC_TS_0$ = goog.getMsg("\n Some text\n {$startTagSpan}Text inside span{$closeTagSpan}\n ", {
24932493 "startTagSpan": "\uFFFD#3\uFFFD",
@@ -2571,7 +2571,7 @@ describe('i18n support in the template compiler', () => {
25712571 ` ;
25722572
25732573 const output = String . raw `
2574- var $I18N_0$;
2574+ let $I18N_0$;
25752575 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
25762576 const $MSG_EXTERNAL_4166854826696768832$$APP_SPEC_TS_0$ = goog.getMsg("{VAR_SELECT, select, single {'single quotes'} double {\"double quotes\"} other {other}}");
25772577 $I18N_0$ = $MSG_EXTERNAL_4166854826696768832$$APP_SPEC_TS_0$;
@@ -2914,7 +2914,7 @@ describe('i18n support in the template compiler', () => {
29142914 // Keeping raw content here to illustrate the difference in placeholders generated for
29152915 // goog.getMsg and $localize calls (see last i18n block).
29162916 const i18n_0 = String . raw `
2917- var $I18N_1$;
2917+ let $I18N_1$;
29182918 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
29192919 const $MSG_APP_SPEC_TS_1$ = goog.getMsg("{VAR_SELECT, select, male {male} female {female} other {other}}");
29202920 $I18N_1$ = $MSG_APP_SPEC_TS_1$;
@@ -2925,7 +2925,7 @@ describe('i18n support in the template compiler', () => {
29252925 $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, {
29262926 "VAR_SELECT": "\uFFFD0\uFFFD"
29272927 });
2928- var $I18N_2$;
2928+ let $I18N_2$;
29292929 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
29302930 const $MSG_APP_SPEC_TS_2$ = goog.getMsg("{VAR_SELECT, select, male {male} female {female} other {other}}");
29312931 $I18N_2$ = $MSG_APP_SPEC_TS_2$;
@@ -2936,7 +2936,7 @@ describe('i18n support in the template compiler', () => {
29362936 $I18N_2$ = $r3$.ɵɵi18nPostprocess($I18N_2$, {
29372937 "VAR_SELECT": "\uFFFD1\uFFFD"
29382938 });
2939- var $I18N_4$;
2939+ let $I18N_4$;
29402940 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
29412941 const $MSG_APP_SPEC_TS__4$ = goog.getMsg("{VAR_SELECT, select, male {male} female {female} other {other}}");
29422942 $I18N_4$ = $MSG_APP_SPEC_TS__4$;
@@ -2947,7 +2947,7 @@ describe('i18n support in the template compiler', () => {
29472947 $I18N_4$ = $r3$.ɵɵi18nPostprocess($I18N_4$, {
29482948 "VAR_SELECT": "\uFFFD0:1\uFFFD"
29492949 });
2950- var $I18N_0$;
2950+ let $I18N_0$;
29512951 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
29522952 const $MSG_APP_SPEC_TS_0$ = goog.getMsg(" {$icu} {$startTagDiv} {$icu} {$closeTagDiv}{$startTagDiv_1} {$icu} {$closeTagDiv}", {
29532953 "startTagDiv": "\uFFFD#2\uFFFD",
@@ -3345,7 +3345,7 @@ describe('i18n support in the template compiler', () => {
33453345 const input = `<div i18n>Some Message</div>` ;
33463346
33473347 const output = String . raw `
3348- var $I18N_0$;
3348+ let $I18N_0$;
33493349 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { … }
33503350 else {
33513351 $I18N_0$ = $localize \`:␟ec93160d6d6a8822214060dd7938bf821c22b226␟6795333002533525253:Some Message\`;
@@ -3360,7 +3360,7 @@ describe('i18n support in the template compiler', () => {
33603360 const input = `<div i18n>Some Message</div>` ;
33613361
33623362 const output = String . raw `
3363- var $I18N_0$;
3363+ let $I18N_0$;
33643364 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { … }
33653365 else {
33663366 $I18N_0$ = $localize \`:␟ec93160d6d6a8822214060dd7938bf821c22b226␟6795333002533525253:Some Message\`;
@@ -3523,7 +3523,7 @@ $` + String.raw`{$I18N_4$}:ICU:\`;
35233523 ` ;
35243524
35253525 const i18n_0 = String . raw `
3526- var $I18N_0$;
3526+ let $I18N_0$;
35273527 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
35283528 const $MSG_EXTERNAL_7128002169381370313$$APP_SPEC_TS_1$ = goog.getMsg("{$startTagXhtmlDiv} Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}{$closeTagXhtmlDiv}", {
35293529 "startTagXhtmlDiv": "\uFFFD#3\uFFFD",
@@ -3584,7 +3584,7 @@ $` + String.raw`{$I18N_4$}:ICU:\`;
35843584 ` ;
35853585
35863586 const i18n_0 = String . raw `
3587- var $I18N_0$;
3587+ let $I18N_0$;
35883588 if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
35893589 const $MSG_EXTERNAL_7428861019045796010$$APP_SPEC_TS_1$ = goog.getMsg(" Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}", {
35903590 "startTagXhtmlSpan": "\uFFFD#4\uFFFD",
0 commit comments