fix: propagate i18n context into @defer blocks and sub-blocks#12
Merged
Brooooooklyn merged 1 commit intomainfrom Feb 5, 2026
Merged
fix: propagate i18n context into @defer blocks and sub-blocks#12Brooooooklyn merged 1 commit intomainfrom
Brooooooklyn merged 1 commit intomainfrom
Conversation
@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>
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.
@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: Nonefor all defer-related blocks instead of callingcreate_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
@deferblocks; 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
@deferand its connected sub-blocks during HTML→R3 lowering, instead of hardcodingi18n: None.Threads that i18n metadata through IR ingestion by passing it into
ingest_defer_viewand settingTemplateOp.i18n_placeholder, enablingpropagate_i18n_blocksto wrap deferred view template functions correctly. Adds integration tests + snapshots covering@deferinside 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.