Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(compiler): ensure that placeholders have the correct sourceSpan#39717

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@petebacondarwin
Copy link
Contributor

When thepreserveWhitespaces is not true, the template parser will
process the parsed AST nodes to remove excess whitespace. Since the
generatedgoog.getMsg() statements rely upon the AST nodes after
this whitespace is removed, the i18n extraction must make a second pass.

Previously this resulted in innacurrate source-spans for the i18n text and
placeholder nodes that were extracted in the second pass.

This commit fixes this by reusing the source-spans from the first pass
when extracting the nodes in the second pass.

Fixes#39671

@petebacondarwinpetebacondarwinforce-pushed thei18n-more-equiv-text-source-span-woes-issue-39671 branch from06d498c to73df49dCompareNovember 16, 2020 21:55
@petebacondarwinpetebacondarwin added action: reviewThe PR is still awaiting reviews from at least one requested reviewer area: compilerIssues related to `ngc`, Angular's template compiler area: i18nIssues related to localization and internationalization labelsNov 16, 2020
@ngbotngbotbot modified the milestone:needsTriageNov 16, 2020
@petebacondarwinpetebacondarwin added the target: patchThis PR is targeted for the next patch release labelNov 16, 2020
@petebacondarwinpetebacondarwin marked this pull request as ready for reviewNovember 16, 2020 22:15
@pullapprovepullapprovebot requested a review fromJoostKNovember 16, 2020 22:15
@petebacondarwinpetebacondarwinforce-pushed thei18n-more-equiv-text-source-span-woes-issue-39671 branch fromdab6e08 to08f5c7eCompareNovember 17, 2020 13:28
Copy link
Contributor

@AndrewKushnirAndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the cleanup and the fix@petebacondarwin 👍

@AndrewKushnirAndrewKushnir added the action: presubmitThe PR is in need of a google3 presubmit labelNov 17, 2020
@AndrewKushnir
Copy link
Contributor

Presubmit.

@AndrewKushnirAndrewKushnir removed the action: presubmitThe PR is in need of a google3 presubmit labelNov 17, 2020
@AndrewKushnir
Copy link
Contributor

@petebacondarwin FYI, presubmit is successful for the changes in this PR. Thank you.

@petebacondarwinpetebacondarwin added action: mergeThe PR is ready for merge by the caretaker and removed action: reviewThe PR is still awaiting reviews from at least one requested reviewer labelsNov 18, 2020
This helper improves the message given when an expectationfails in a source-mapping test.
When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixesangular#39671
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces.  The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.
@petebacondarwinpetebacondarwinforce-pushed thei18n-more-equiv-text-source-span-woes-issue-39671 branch from08f5c7e to9ee0012CompareNovember 19, 2020 12:25
@petebacondarwinpetebacondarwin removed the request for review fromJoostKNovember 19, 2020 22:26
@AndrewKushnir
Copy link
Contributor

Presubmit #2.

AndrewKushnir pushed a commit that referenced this pull requestNov 20, 2020
This helper improves the message given when an expectationfails in a source-mapping test.PRClose#39717
AndrewKushnir pushed a commit that referenced this pull requestNov 20, 2020
…39717)When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixes#39671PRClose#39717
AndrewKushnir pushed a commit that referenced this pull requestNov 20, 2020
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces.  The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.PRClose#39717
AndrewKushnir pushed a commit that referenced this pull requestNov 20, 2020
…39717)When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixes#39671PRClose#39717
AndrewKushnir pushed a commit that referenced this pull requestNov 20, 2020
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces.  The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.PRClose#39717
@petebacondarwinpetebacondarwin deleted the i18n-more-equiv-text-source-span-woes-issue-39671 branchNovember 25, 2020 19:20
@angular-automatic-lock-bot

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about ourautomatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-botangular-automatic-lock-botbot locked and limited conversation to collaboratorsDec 26, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@AndrewKushnirAndrewKushnirAndrewKushnir approved these changes

Assignees

No one assigned

Labels

action: mergeThe PR is ready for merge by the caretakerarea: compilerIssues related to `ngc`, Angular's template compilerarea: i18nIssues related to localization and internationalizationcla: yestarget: patchThis PR is targeted for the next patch release

Projects

None yet

Milestone

needsTriage

Development

Successfully merging this pull request may close these issues.

ng extract-i18n extracts incorrectequiv-text value

2 participants

@petebacondarwin@AndrewKushnir

[8]ページ先頭

©2009-2025 Movatter.jp