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

Initialize i18n after plugins load more #10987

Merged
merged 1 commit into from
May 9, 2024

Conversation

codyrancher
Copy link
Contributor

@codyrancher codyrancher commented May 9, 2024

Summary

We previously initialized i18n on every middleware invocation. This happened to be called after harvester was loaded by the authenticated middleware which loaded it's i18n keys.

This will now call i18n/init in a 404 after the auth middleware is called and harvester pages are loaded.

Areas or cases that should be tested

Plugin translations, mostly Harvester.

Screenshot/Video

Screenshot 2024-05-09 025038

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

We previously initialized i18n on every middleware invocation. This happened to be called after harvester was loaded by the authenticated middleware which loaded it's i18n keys.

This will now call i18n/init after the plugin locales have been loaded. This will be non-blocking so I don't see it as being an issue that we call it once for each plugin.
@codyrancher codyrancher added this to the v2.9.0 milestone May 9, 2024
@codyrancher codyrancher requested a review from torchiaf May 9, 2024 13:56
@codyrancher codyrancher marked this pull request as ready for review May 9, 2024 13:56
Copy link
Member

@torchiaf torchiaf left a comment

Choose a reason for hiding this comment

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

LGTM

@codyrancher codyrancher merged commit 3425c6c into rancher:master May 9, 2024
34 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