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

Replace angular translation before its used #77

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

MariaAga
Copy link
Contributor

Needs Katello/katello#11158
Explanation copy from that pr:

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'}) %>

Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

Untested yet, but LGTM.

}
}
document.addEventListener("loadAngularJSi18n", function () {
if (typeof angular !== "undefined") {
Copy link
Member

Choose a reason for hiding this comment

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

is there any chance for angular to be undefined at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not, but I thought to leave it as is? I can remove it.

Copy link
Member

Choose a reason for hiding this comment

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

nah, just checking my brain :)

Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

tested and works fine!

@evgeni evgeni merged commit 8275ff4 into RedHatSatellite:develop Sep 24, 2024
21 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