Repository navigation
Init custom translations - #8790
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
| await Promise.all([applicationsPromise, themePromise]) | ||
| const customTranslations = {} | ||
|
|
||
| for (const customTranslation of configurationManager.customTranslations) { |
There was a problem hiding this comment.
Could you please move fetching and collecting/merging the custom translations into its own method? Something like fetchCustomTranslations which then returns the customTranslations object. Otherwise this is an abstraction level mismatch. All the other code in this bootstrapApp method is on a higher abstraction level.
|
I already went ahead and added I needed the |
| }) | ||
| const themePromise = announceTheme({ store, app, designSystem, runtimeConfiguration }) | ||
| await Promise.all([applicationsPromise, themePromise]) | ||
| const customTranslations = await loadCustomTranslations({ configurationManager }) |
There was a problem hiding this comment.
Last nitpick: tiny performance improvement possible by splitting this into promise creation and awaiting the resolved promise together with other promises. This is a good thing because the promise execution starts immediately with creation, so this enables parallel processing instead of awaiting promises sequentially.
In other words:
Please split this line into:
const customTranslationsPromise = loadCustomTranslations({ configurationManager })for promise creation and add that to the Promise.all. You can access the resolved custom translations like this:
const [customTranslations] = await Promise.all([customTranslationsPromise, applicationsPromise, themePromise])|
Linter complains :-) |
|
SonarCloud Quality Gate failed. |









Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: