fix(ivy): more descriptive errors for nested i18n sections (#33583)
This commit moves nested i18n section detection to an earlier stage where we convert HTML AST to Ivy AST. This also gives a chance to produce better diagnistic message for nested i18n sections, that also includes a file name and location. PR Close #33583
This commit is contained in:
@ -535,10 +535,6 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
||||
const isI18nRootElement: boolean =
|
||||
isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);
|
||||
|
||||
if (isI18nRootElement && this.i18n) {
|
||||
throw new Error(`Could not mark an element as translatable inside of a translatable section`);
|
||||
}
|
||||
|
||||
const i18nAttrs: (t.TextAttribute | t.BoundAttribute)[] = [];
|
||||
const outputAttrs: t.TextAttribute[] = [];
|
||||
let ngProjectAsAttr: t.TextAttribute|undefined;
|
||||
|
Reference in New Issue
Block a user