Skip to content

fix: preserve i18n metadata on structural directive attribute hoisting and split namespace attrs#13

Merged
Brooooooklyn merged 1 commit intomainfrom
02-05-fix_consts_index_off_by_n
Feb 6, 2026
Merged

fix: preserve i18n metadata on structural directive attribute hoisting and split namespace attrs#13
Brooooooklyn merged 1 commit intomainfrom
02-05-fix_consts_index_off_by_n

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Feb 5, 2026

When an element has both a structural directive (*ngIf) and i18n-translated attributes, the attribute hoisting in filter_animation_attributes/inputs was discarding i18n metadata (setting i18n: None). Additionally, ingest_template used the non-i18n variant for hoisted attributes, and namespace attributes (e.g. xmlns:xlink) were not split into namespace/name pairs. Together these caused incorrect const deduplication and index shifts.


Note

Medium Risk
Touches core template ingestion/const collection inputs (namespace handling and i18n metadata), which can shift generated const indices and affect runtime rendering if edge cases are missed; changes are well-covered by new integration tests.

Overview
Fixes structural-directive attribute hoisting so static attributes and inputs keep their i18n metadata end-to-end, ensuring i18n-marked attributes generate distinct const entries instead of being incorrectly deduplicated.

Updates ingestion of hoisted/static attributes to always use the i18n-aware path and splits namespaced attribute names (e.g. xmlns:xlink) into (namespace, local_name) when producing ExtractedAttributeOp, aligning const serialization with Angular and avoiding duplicate consts/index shifts. Adds integration tests covering SVG namespace attributes and i18n attributes on *ngIf-wrapped elements.

Written by Cursor Bugbot for commit 6f4028e. This will update automatically on new commits. Configure here.

…g and split namespace attrs

When an element has both a structural directive (*ngIf) and i18n-translated
attributes, the attribute hoisting in filter_animation_attributes/inputs
was discarding i18n metadata (setting i18n: None). Additionally,
ingest_template used the non-i18n variant for hoisted attributes, and
namespace attributes (e.g. xmlns:xlink) were not split into namespace/name
pairs. Together these caused incorrect const deduplication and index shifts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn merged commit 5fce15e into main Feb 6, 2026
3 checks passed
@Brooooooklyn Brooooooklyn deleted the 02-05-fix_consts_index_off_by_n branch February 6, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant