Integrate blocks into the i18n pipeline#52958
Closed
crisbeto wants to merge 2 commits intoangular:mainfrom
Closed
Conversation
443dc63 to
0c448eb
Compare
AndrewKushnir
approved these changes
Nov 16, 2023
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
@crisbeto awesome work 👍
packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/blocks/conditional.ts
Outdated
Show resolved
Hide resolved
When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders.
0c448eb to
9b536b0
Compare
Adds support for generating i18n instructions inside of blocks. Fixes angular#52540. Fixes angular#52767.
9b536b0 to
a3d68e4
Compare
Contributor
|
Caretaker note: this PR will be merged on Monday (11/20). |
Contributor
|
This PR was merged into the repository by commit 406049b. |
AndrewKushnir
pushed a commit
that referenced
this pull request
Nov 20, 2023
AndrewKushnir
pushed a commit
that referenced
this pull request
Nov 20, 2023
When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders. PR Close #52958
AndrewKushnir
pushed a commit
that referenced
this pull request
Nov 20, 2023
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…r#52958) When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders. PR Close angular#52958
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
Adds support for generating i18n instructions inside of blocks. Fixes angular#52540. Fixes angular#52767. PR Close angular#52958
rlmestre
pushed a commit
to rlmestre/angular
that referenced
this pull request
Jan 26, 2024
…r#52958) When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders. PR Close angular#52958
rlmestre
pushed a commit
to rlmestre/angular
that referenced
this pull request
Jan 26, 2024
Adds support for generating i18n instructions inside of blocks. Fixes angular#52540. Fixes angular#52767. PR Close angular#52958
amilamen
pushed a commit
to amilamen/angular
that referenced
this pull request
Jan 26, 2024
…r#52958) When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders. PR Close angular#52958
amilamen
pushed a commit
to amilamen/angular
that referenced
this pull request
Jan 26, 2024
Adds support for generating i18n instructions inside of blocks. Fixes angular#52540. Fixes angular#52767. PR Close angular#52958
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 blocks were first implemented, they were treated as containers for i18n purposes which meant that while their content was processed, the container would be basically transparent. This comes with a couple of problems:
These changes address the issue by fully integrating blocks into the i18n pipeline. Blocks are represented as a new node called
BlockPlaceholderin the i18n AST, with the one exception being@switchwhich is still aContainerwhile the separate cases are treated asBlockPlaceholder.Includes the following commits:
fix(compiler): produce placeholder for blocks in i18n bundles
When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message.
These changes introduce a new
BlockPlaceholderAST node and integrate it into the i18n pipeline. With the new node blocks are represented with theSTART_BLOCK_<name>andCLOSE_BLOCK_<name>placeholders.fix(compiler): generate i18n instructions for blocks
Adds support for generating i18n instructions inside of blocks.
Fixes #52540.
Fixes #52767.