-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
advanced bundling js translation not (always) working #23821
Comments
Hi @davidverholen. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @davidverholen do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @davidverholen. Thank you for working on this issue.
|
✅ Confirmed by @davidverholen Issue Available: @davidverholen, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@DrewML fyi. I do not really have an idea what happens in the translate.phtml and why it is implemented like that (instead of adding the translations during init of the translate component) so I do not really have an Idea how to fix this. |
No problem @davidverholen - appreciate the thorough bug report. Getting it assigned out to someone internally |
Internal ticket MC-19247 created and it is currently in progress |
Hi @davidverholen fix is merged into mainline with this commit: |
The issue has been fixed and delivered into |
When using advanced bundling, some core strings are not translatable.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
(same probably for OK, but OK does not have to be translated for many locales)
This error can potentially appear in many more cases, where strings are translated in js before the translations are fully initialized.
I'm not a frontend dev but it seems that the translations are initialized in the body here while some js components already try to use the translate function during initialization.
When bundled, this happens before the actual translations are loaded
See translation initialization:
https://github.com/magento/magento2/blob/2e7f0396e370074b4998a6b56636fb1ddb6da74b/app/code/Magento/Translation/view/base/templates/translate.phtml
and confirm modal initialization:
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Ui/view/base/web/js/modal/confirm.js
The text was updated successfully, but these errors were encountered: