forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(compiler): Enable meaning_description i18n test in template …
…pipeline The meaning decription test has different i18n message orders, as well as a different const order, but it is in fact passing.
- Loading branch information
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
...t_cases/r3_view_compiler_i18n/element_attributes/meaning_description_template.pipeline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
consts: | ||
() => { | ||
__i18nMsg__('Title B', [], {}, {id: 'idB', meaning: 'meaningB', desc: 'descB'}) | ||
__i18nMsg__('Title C', [], {}, {meaning: 'meaningC'}) | ||
__i18nMsg__('Title D', [], {}, {meaning: 'meaningD', desc: 'descD'}) | ||
__i18nMsg__('Title E', [], {}, {id: 'idE', desc: 'meaningE'}) | ||
__i18nMsg__('Title F', [], {}, {id: 'idF'}) | ||
|
||
// NOTE: Keeping this block as a raw string, since it checks escaping of special chars. | ||
let $i18n_23$; | ||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { | ||
/** | ||
* @desc [BACKUP_${MESSAGE}_ID:idH]`desc | ||
*/ | ||
const $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$ = goog.getMsg("Title G"); | ||
$i18n_23$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$; | ||
} else { | ||
$i18n_23$ = $localize`:[BACKUP_$\{MESSAGE}_ID\:idH]\`desc@@idG:Title G`; | ||
} | ||
|
||
__i18nMsg__('Content A', [], {}, {id: 'idA', meaning: 'meaningA', desc: 'descA'}) | ||
|
||
// NOTE: Keeping this block as a raw string, since it checks escaping of special chars. | ||
let $i18n_7$; | ||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { | ||
/** | ||
* @desc Some text \' [BACKUP_MESSAGE_ID: xxx] | ||
*/ | ||
const $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$ = goog.getMsg("Content H"); | ||
$i18n_7$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$; | ||
} else { | ||
$i18n_7$ = $localize`:Some text \\' [BACKUP_MESSAGE_ID\: xxx]:Content H`; | ||
} | ||
|
||
|
||
return [ | ||
$i18n_0$, $i18n_7$, ["title", $i18n_1$], ["title", $i18n_2$], ["title", $i18n_3$], | ||
["title", $i18n_4$], ["title", $i18n_5$], ["title", $i18n_6$] | ||
]; | ||
}, | ||
|
||
template: function MyComponent_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵelementStart(0, "div"); | ||
$r3$.ɵɵi18n(1, 0); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(2, "div", 2); | ||
$r3$.ɵɵtext(3, "Content B"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(4, "div", 3); | ||
$r3$.ɵɵtext(5, "Content C"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(6, "div", 4); | ||
$r3$.ɵɵtext(7, "Content D"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(8, "div", 5); | ||
$r3$.ɵɵtext(9, "Content E"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(10, "div", 6); | ||
$r3$.ɵɵtext(11, "Content F"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(12, "div", 7); | ||
$r3$.ɵɵtext(13, "Content G"); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(14, "div"); | ||
$r3$.ɵɵi18n(15, 1); | ||
$r3$.ɵɵelementEnd(); | ||
} | ||
} |