Skip to content

fix(compiler): error when ng-content fallback has translated children #63156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Fixes that the pipeline wasn't processing the fallback content of ng-content for i18n which resulted in a compiler error further down the line.

Fixes #63065.

@crisbeto crisbeto added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 14, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Aug 14, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 14, 2025
@crisbeto crisbeto requested a review from JoostK August 14, 2025 07:38
currentOps!.i18nBlock,
pendingStructuralDirective,
);
pendingStructuralDirective = undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also copied, but I'd expect this to be irrelevant for projected views?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the full context on it, but I think we still need it because the Projection op might not have a i18nPlaceholder in which case the pendingStructuralDirective won't have been reset further up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see; I missed that it's passed into the recordTemplate* calls.

Fixes that the pipeline wasn't processing the fallback content of `ng-content` for i18n which resulted in a compiler error further down the line.

Fixes angular#63065.
@crisbeto crisbeto force-pushed the 63065/ng-content-i18n branch from 57cd3db to d369df8 Compare August 14, 2025 10:52
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 14, 2025
@crisbeto
Copy link
Member Author

This PR was merged into the repository by commit 5b3933f.

The changes were merged into the following branches: main, 20.1.x, 20.2.x

crisbeto added a commit that referenced this pull request Aug 15, 2025
…#63156)

Fixes that the pipeline wasn't processing the fallback content of `ng-content` for i18n which resulted in a compiler error further down the line.

Fixes #63065.

PR Close #63156
@crisbeto crisbeto closed this in 5b3933f Aug 15, 2025
crisbeto added a commit that referenced this pull request Aug 15, 2025
…#63156)

Fixes that the pipeline wasn't processing the fallback content of `ng-content` for i18n which resulted in a compiler error further down the line.

Fixes #63065.

PR Close #63156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localized content with html as fallback in ng-content fails: Cannot read properties of undefined (reading 'visitExpression')
2 participants