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): do not use MSG_ prefix for i18nPostprocess invocation (FW-779) #27468

Closed

Conversation

AndrewKushnir
Copy link
Contributor

Closure Compiler doesn't allow non-goo.getMsg const names to start with MSG_, so we should use different prefix for const that references a result of the i18nPostprocess fn invocation.

Also, as a part of this PR, const names received file based prefix to avoid naming collisions that Closure Compiler doesn't tolerate (there should be unique instance of goog.getMsg call across the whole app).

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature

Does this PR introduce a breaking change?

  • Yes
  • No

@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 Dec 5, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 5, 2018
@mary-poppins
Copy link

You can preview a58ac85 at https://pr27468-a58ac85.ngbuilds.io/.

@mary-poppins
Copy link

You can preview d52d0ff at https://pr27468-d52d0ff.ngbuilds.io/.

Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Please update the commit message to include the change to use unique MSG_ variable names as well (with the $$ suffix).

@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented Dec 13, 2018

Presubmit

Closure Compiler doesn't allow non-goo.getMsg const names to start with `MSG_`, so we should use different prefix for const that references a result of the `i18nPostprocess` fn invocation. With this update we also append file-based prefix to i18n constants (via $$ postfix) to ensure the names are unique across codebase of a project (otherwise it might lead to errors while compiling a project with Closure Compiler).
@mary-poppins
Copy link

You can preview af9d031 at https://pr27468-af9d031.ngbuilds.io/.

@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 Dec 13, 2018
@mhevery mhevery closed this in fdf3998 Dec 13, 2018
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…79) (angular#27468)

Closure Compiler doesn't allow non-goo.getMsg const names to start with `MSG_`, so we should use different prefix for const that references a result of the `i18nPostprocess` fn invocation. With this update we also append file-based prefix to i18n constants (via $$ postfix) to ensure the names are unique across codebase of a project (otherwise it might lead to errors while compiling a project with Closure Compiler).

PR Close angular#27468
@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

4 participants