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(core): handle multiple i18n attributes with expression bindings #41882
fix(core): handle multiple i18n attributes with expression bindings #41882
Conversation
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.
LGTM, with cleanup
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.
@petebacondarwin thanks for fixing the issue and adding docs with perf assessment 👍
One comment that I have is that I'd like to propose adding a new test (or update an existing one to repro the issue) in packages/core/test/acceptance/i18n_spec.ts
file as well, so we have better coverage there.
3e0d8c4
to
5366d2a
Compare
@AndrewKushnir - I have added the acceptance test and now we are go for a presubmit |
FYI presubmits are successful for the changes in this PR. |
When there are multiple attributes that are marked for i18n translation, which contain expression bindings, we were generating i18n update op-codes that did not accurately map to the correct value to be bound in the lView. Each attribute's bindings were relative to the start of the lView first attributes values rather than to their own. This fix passes the current binding index to `generateBindingUpdateOpCodes()` when processing i18n attributes to account for this. Fixes angular#41869
5366d2a
to
ed4153c
Compare
I rebased to clear the conflict. Only change was in a test file. So a new presubmit may not be necessary. |
…41882) When there are multiple attributes that are marked for i18n translation, which contain expression bindings, we were generating i18n update op-codes that did not accurately map to the correct value to be bound in the lView. Each attribute's bindings were relative to the start of the lView first attributes values rather than to their own. This fix passes the current binding index to `generateBindingUpdateOpCodes()` when processing i18n attributes to account for this. Fixes #41869 PR Close #41882
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. |
When there are multiple attributes that are marked for i18n translation,
which contain expression bindings, we were generating i18n update op-codes
that did not accurately map to the correct value to be bound in the lView.
Each attribute's bindings were relative to the start of the lView first
attributes values rather than to their own.
This fix passes the current binding index to
generateBindingUpdateOpCodes()
when processing i18n attributes to account for this.
Fixes #41869