Skip to content

fix: propagate i18n context into @defer blocks and sub-blocks#12

Merged
Brooooooklyn merged 1 commit intomainfrom
02-05-fix_defer_i18n_wrapping
Feb 5, 2026
Merged

fix: propagate i18n context into @defer blocks and sub-blocks#12
Brooooooklyn merged 1 commit intomainfrom
02-05-fix_defer_i18n_wrapping

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Feb 5, 2026

@defer, @Placeholder, @Loading, and @error blocks inside i18n contexts were missing i18nStart/i18nEnd wrapping in their generated templates. The HTML-to-R3 transform hardcoded i18n: None for all defer-related blocks instead of calling create_block_placeholder() like @if, @for, and @switch blocks do. The IR ingestion layer also needed to pass the i18n metadata through to the TemplateOp so propagate_i18n_blocks can wrap deferred views.

Fixes unlock-view-confirm mismatch in ClickUp comparison (23 → 22).


Note

Medium Risk
Touches compiler pipeline stages (AST lowering and IR ingestion) affecting generated code for all @defer blocks; risk is mainly incorrect i18n placeholder propagation or template indexing regressions, but changes are localized and covered by new integration tests.

Overview
Fixes missing i18n wrapping for deferred templates by generating i18n block placeholders for @defer and its connected sub-blocks during HTML→R3 lowering, instead of hardcoding i18n: None.

Threads that i18n metadata through IR ingestion by passing it into ingest_defer_view and setting TemplateOp.i18n_placeholder, enabling propagate_i18n_blocks to wrap deferred view template functions correctly. Adds integration tests + snapshots covering @defer inside i18n, including nesting under a structural directive, and asserts correct sub-template indices and declaration counts.

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

@defer, @Placeholder, @Loading, and @error blocks inside i18n contexts
were missing i18nStart/i18nEnd wrapping in their generated templates.
The HTML-to-R3 transform hardcoded `i18n: None` for all defer-related
blocks instead of calling `create_block_placeholder()` like @if, @for,
and @switch blocks do. The IR ingestion layer also needed to pass the
i18n metadata through to the TemplateOp so propagate_i18n_blocks can
wrap deferred views.

Fixes unlock-view-confirm mismatch in ClickUp comparison (23 → 22).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn merged commit a584add into main Feb 5, 2026
3 checks passed
@Brooooooklyn Brooooooklyn deleted the 02-05-fix_defer_i18n_wrapping branch February 5, 2026 13:43
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