Skip to content

Commit

Permalink
fixup! fix(ivy): more descriptive errors for nested i18n sections
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKushnir committed Nov 5, 2019
1 parent c78f734 commit 59dd5ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -3419,7 +3419,7 @@ describe('i18n support in the template compiler', () => {
expect(errorThrown.ngParseErrors.length).toBe(1);
const msg = errorThrown.ngParseErrors[0].toString();
expect(msg).toContain(
'Could not mark an element as translatable inside of a translatable section');
'Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.');
expect(msg).toContain(expectedErrorText);
expect(msg).toMatch(/app\/spec\.ts\@\d+\:\d+/);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/src/render3/r3_template_transform.ts
Expand Up @@ -90,7 +90,7 @@ class HtmlAstToIvyAst implements html.Visitor {
if (isI18nRootElement) {
if (this.inI18nBlock) {
this.reportError(
'Could not mark an element as translatable inside of a translatable section',
'Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.',
element.sourceSpan);
}
this.inI18nBlock = true;
Expand Down

0 comments on commit 59dd5ff

Please sign in to comment.