New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler-cli): output source-mappings for localized strings #38645
fix(compiler-cli): output source-mappings for localized strings #38645
Conversation
c0e8383
to
06d0159
Compare
0ead48b
to
40abce4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in commit "move the MessagePiece classes into output_ast.ts""
"render the source-spans of each of piece" -> "render the source-spans of each piece"
91e92b4
to
5cbf6eb
Compare
…parser The expression parser will split the expression up at the interpolation markers into expressions and static strings. This commit also captures the positions of these strings in the expression to be used in source-mapping later.
The `TagPlaceholder` can contain children, in which case there are two source spans of interest: the opening tag and the closing tag. This commit now allows the closing tag source-span to be tracked, so that it can be used later in source-mapping.
The `MessagePiece` and derived classes, `LiteralPiece` and `PlaceholderPiece` need to be referenced in the `LocalizedString` output AST class, so that we can render the source-spans of each piece.
Previously, localized strings had very limited or incorrect source-mapping information available. Now the i18n AST nodes and related output AST nodes include source-span information about message-parts and placeholders - including closing tag placeholders. This information is then used when generating the final localized string ASTs to ensure that the correct source-mapping is rendered. See angular#38588 (comment)
5cbf6eb
to
f45a4ef
Compare
f806b13
to
e977dc7
Compare
) Previously, localized strings had very limited or incorrect source-mapping information available. Now the i18n AST nodes and related output AST nodes include source-span information about message-parts and placeholders - including closing tag placeholders. This information is then used when generating the final localized string ASTs to ensure that the correct source-mapping is rendered. See #38588 (comment) PR Close #38645
@petebacondarwin - There was a merge conflict with the |
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. |
Previously, localized strings had very limited or incorrect source-mapping
information available.
Now the i18n AST nodes and related output AST nodes include source-span
information about message-parts and placeholders - including closing tag
placeholders.
This information is then used when generating the final localized string
ASTs to ensure that the correct source-mapping is rendered.
See #38588 (comment)
Fixes #38711
Fixes #38694