fix: preserve i18n metadata on structural directive attribute hoisting and split namespace attrs#13
Merged
Brooooooklyn merged 1 commit intomainfrom Feb 6, 2026
Conversation
…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>
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.
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
i18nmetadata 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 producingExtractedAttributeOp, 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.