-
Notifications
You must be signed in to change notification settings - Fork 266
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
Removing the i18n middleware from the application #10923
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ const errorHandler = Vue.config.errorHandler || console.error; // eslint-disable | |
createApp(nuxt.publicRuntimeConfig).then(mountApp).catch(errorHandler); // eslint-disable-line no-undef | ||
|
||
function callMiddleware(Components, context) { | ||
let midd = ['i18n']; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the only place I found it. If you can find it elsewhere let me know. |
||
let midd = []; | ||
let unknownMiddleware = false; | ||
|
||
Components.forEach((Component) => { | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -778,7 +778,6 @@ export const actions = { | |
} | ||
|
||
res = await allHash(promises); | ||
dispatch('i18n/init'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No point in having it here if we need it for every page and we're already making that call elsewhere. |
||
const isMultiCluster = getters['isMultiCluster']; | ||
|
||
// If the local cluster is a Harvester cluster and 'rancher-manager-support' is true, it means that the embedded Rancher is being used. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should dispatch be mocked with
jest.fn()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could actually just be entirely omitted now that I access it using the optional operator. If not, yeah we should mock it.
I'll address it in my next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we mock the dispatch, then we should mock everything else too.
In both cases we are not that strict though, as we do not test the i18n, we just want to not break it.