fix: i18n property bindings use I18n AttributeMarker in consts array#1
Merged
Merged
Conversation
Property bindings with i18n-* markers (e.g., [heading]="title" i18n-heading) were extracted as BindingKind::Property (marker 3) instead of BindingKind::I18n (marker 6), causing const index mismatches with Angular's output. Two fixes: - Parser (html_to_r3.rs): pass i18n metadata from i18n-* attributes to bracket and bind- property bindings, matching Angular's categorizePropertyAttributes - attribute_extraction.rs: convert Property ops with i18n_message to BindingKind::I18n, ported from Angular's attribute_extraction.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
BenjaminDobler
added a commit
to BenjaminDobler/oxc-angular-compiler
that referenced
this pull request
Mar 23, 2026
ɵɵtextInterpolate1/2/...N always require all positional string args including the trailing suffix. When the suffix was an empty string, it was incorrectly dropped, causing `undefined` to be concatenated at runtime (e.g. `#1undefined` instead of `voidzero-dev#1`). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Property bindings with i18n-* markers (e.g., [heading]="title" i18n-heading) were extracted as BindingKind::Property (marker 3) instead of BindingKind::I18n (marker 6), causing const index mismatches with Angular's output.
Two fixes:
Note
Medium Risk
Changes IR extraction/categorization for property bindings, which can alter generated consts arrays and directive matching/i18n behavior at runtime. Scope is narrow and backed by new integration tests.
Overview
Aligns i18n handling with Angular by propagating
i18n-*metadata ontobind-fooand[foo]property bindings during HTML-to-R3 transform, and by extracting property ops with ani18n_messageasBindingKind::I18n(while preservingTemplatebindings).Adds integration coverage to assert both bracket property bindings and interpolated attributes with
i18n-*markers produceAttributeMarker.I18n(6) entries in the generated consts array.Written by Cursor Bugbot for commit af86328. This will update automatically on new commits. Configure here.