fix: shared features translation bundle issue #4424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Include the proper translation for group shared features package in BUIE CDN bundles.
Issue
The shared features translation has never worked inside BUIE after building CDN bundles.
In buildLocaleAssets.js when we call Webpack.config file we set the line of code to resolve the BUIE default i18n file instead of the properly translated bundled file (this includes all the groupSharedFeature messages) that we created by buildLanguages.js.
In Webpack.config:
'box-ui-elements-locale-data': path.resolve(i18n/${language})Theoretically once I updated this path to use the already bundled file it should work. However we face another issue where the Babel is throwing error when transpiling
@boximported files since the Babel config is different between frontend and BUIE.Solution
Create mergeTranslations file to replace the frontend i18n/buildLanguageBundles which merges translations from all translationDependencies into the main i18n files without needing the Babel to transpile them again.
Testing Results
See the proper translation:
