Skip to content

Commit

Permalink
Initialize i18n after plugins load more
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
codyrancher committed May 9, 2024
1 parent 4dffddb commit ef1c41f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shell/core/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export default function({
plugin.locales.forEach((localeObj) => {
store.dispatch('i18n/addLocale', localeObj);
});
store.dispatch('i18n/init');

// Routes
pluginRoutes.addRoutes(plugin, plugin.routes);
Expand Down

0 comments on commit ef1c41f

Please sign in to comment.