Commit c19950c
fix: i18n property bindings use I18n AttributeMarker in consts array (#1)
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>1 parent c1acbde commit c19950c
3 files changed
Lines changed: 108 additions & 11 deletions
File tree
- crates/oxc_angular_compiler
- src
- pipeline/phases
- transform
- tests
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
190 | 207 | | |
191 | 208 | | |
192 | | - | |
193 | 209 | | |
194 | 210 | | |
195 | 211 | | |
196 | | - | |
| 212 | + | |
197 | 213 | | |
198 | 214 | | |
199 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2605 | 2605 | | |
2606 | 2606 | | |
2607 | 2607 | | |
2608 | | - | |
| 2608 | + | |
| 2609 | + | |
2609 | 2610 | | |
2610 | 2611 | | |
2611 | 2612 | | |
2612 | 2613 | | |
2613 | 2614 | | |
2614 | | - | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2615 | 2618 | | |
2616 | 2619 | | |
2617 | 2620 | | |
| |||
2717 | 2720 | | |
2718 | 2721 | | |
2719 | 2722 | | |
2720 | | - | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
2727 | 2730 | | |
2728 | 2731 | | |
2729 | 2732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3572 | 3572 | | |
3573 | 3573 | | |
3574 | 3574 | | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
0 commit comments