Skip to content

fix(ivy): proper i18n postprocessing in case of nested templates - #28209

Closed
AndrewKushnir wants to merge 4 commits into
angular:masterfrom
AndrewKushnir:FW-910_i18n_postprocess_fix
Closed

AndrewKushnir wants to merge 4 commits into
angular:masterfrom
AndrewKushnir:FW-910_i18n_postprocess_fix

Conversation

@AndrewKushnir

Copy link
Copy Markdown
Contributor

Prior to this change the postprocess step relied on the order of placeholders combined in one group (e.g. [�#1�|�*1:1�]). The order is not guaranteed in case we have nested templates (since we use BFS to process templates) and some tags are represented using same placeholders. This change performs postprocessing more accurate by keeping track of currently active template and searching for matching placeholder.

Also as a part of this PR I've added a couple tests to make sure ICU-only templates are also handled correctly. That's technically unrelated, but it turned out that no additional changes are required, i.e. just 2 new test cases added.

This PR resolves FW-910.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

Prior to this change the postprocess step relied on the order of placeholders combined in one group (e.g. [�#1�|�*1:1�]). The order is not guaranteed in case we have nested templates (since we use BFS to process templates) and some tags are represented using same placeholders. This change performs postprocessing more accurate by keeping track of currently active template and searching for matching placeholder.
@AndrewKushnir AndrewKushnir added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer area: i18n Issues related to localization and internationalization target: major This PR is targeted for the next major release comp: ivy labels Jan 17, 2019
@AndrewKushnir
AndrewKushnir requested review from a team and ocombe January 17, 2019 19:08
@ngbot ngbot Bot added this to the needsTriage milestone Jan 17, 2019
@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

Comment thread packages/core/src/render3/i18n.ts Resolved
@mary-poppins

Copy link
Copy Markdown

Comment thread packages/core/src/render3/i18n.ts Resolved
@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Presubmit

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker labels Jan 25, 2019
@kara kara removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 25, 2019
Comment thread packages/core/src/render3/i18n.ts Resolved
@AndrewKushnir AndrewKushnir added the action: merge The PR is ready for merge by the caretaker label Jan 25, 2019
@jasonaden jasonaden closed this in 2da82db Jan 25, 2019
vetom pushed a commit to vetom/angular that referenced this pull request Jan 31, 2019
…ular#28209)

Prior to this change the postprocess step relied on the order of placeholders combined in one group (e.g. [�angular#1�|�*1:1�]). The order is not guaranteed in case we have nested templates (since we use BFS to process templates) and some tags are represented using same placeholders. This change performs postprocessing more accurate by keeping track of currently active template and searching for matching placeholder.

PR Close angular#28209
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: i18n Issues related to localization and internationalization cla: yes target: major This PR is targeted for the next major release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants