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

Fixes #37858 - Send events on angular translation load #11158

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

MariaAga
Copy link
Contributor

What are the changes introduced in this pull request?

Sending events after loading i18n and gettext in angular

Considerations taken when implementing this change?

Could not know when they are loaded otherwise.
Tried using MutationObserver to see when the script to load them was called, but that happens just before they are loaded.

The deface for branding needs to happen (from engines/bastion/app/views/bastion/layouts/assets.html.erb):

  • after angular and i18n, gettext are created: <%= javascript_include_tag('bastion/bastion', {type: 'module'})%>
  • and before the first translation is used with translate(..., I think its in: <%= javascript_include_tag('bastion_katello/bastion_katello', {type: 'module'}) %>

What are the testing steps for this pull request?

I dont see how it could break anything

Copy link
Member

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

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

12:1  error  Unexpected token const

gotta use ES5 in AngularJS-land, sorry ;)

@MariaAga
Copy link
Contributor Author

Thanks! thought it would be ok since it did fire the events

@jeremylenz
Copy link
Member

Thanks! thought it would be ok since it did fire the events

Yeah I think browsers handle it just fine, it's probably just our tests or grunt or something

Copy link
Member

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks @MariaAga !

@jeremylenz jeremylenz merged commit f5510e9 into Katello:master Sep 23, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants