Skip to content
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(ivy): avoid duplicate i18n consts in generated output #28967

Conversation

AndrewKushnir
Copy link
Contributor

Prior to this change, the logic that outputs i18n consts (like const MSG_XXX = goog.getMsg(...)) didn't have a check whether a given const that represent a certain i18n message was already included into the generated output. This commit adds the logic to mark corresponding i18n contexts after translation was generated, to avoid duplicate consts in the output.

Verification of i18n-related consts uniqueness was also added to the test suite (generated output for each test will be verified), so we can avoid a regression.

This PR resolves FW-1102.

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 logic that outputs i18n consts (like `const MSG_XXX = goog.getMsg(...)`) didn't have a check whether a given const that represent a certain i18n message was already included into the generated output. This commit adds the logic to mark corresponding i18n contexts after translation was generated, to avoid duplicate consts in the output.
@AndrewKushnir AndrewKushnir added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer area: i18n target: major This PR is targeted for the next major release comp: ivy labels Feb 25, 2019
@AndrewKushnir AndrewKushnir requested review from a team as code owners February 25, 2019 20:48
@ngbot ngbot bot added this to the needsTriage milestone Feb 25, 2019
@AndrewKushnir AndrewKushnir changed the title fix(ivy): avoid duplicate i18n consts to be present in generated output fix(ivy): avoid duplicate i18n consts in generated output Feb 25, 2019
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 27, 2019
@AndrewKushnir
Copy link
Contributor Author

Presubmit

@AndrewKushnir AndrewKushnir added the action: merge The PR is ready for merge by the caretaker label Feb 27, 2019
@benlesh benlesh closed this in 034de06 Feb 27, 2019
@angular-automatic-lock-bot
Copy link

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 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.

None yet

5 participants