-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rewrote js/mage/translate.js
without prototypejs
#3662
Conversation
What about ES5? |
Yes! #3645 has started. |
With ES6 syntax, we will instant crash all old browsers that does not understand the syntax. |
sure but es6 support is 98.31%... should we not use it because of opera mini and IE11? then let's move everything to the next branch |
|
I think some other ticked mentioned transpiling. Or both and a feature flag decides whether or not to load the ES6 file. I know that in our frontend no ES6 is allowed (sadly), since we have (still) lots of hits on older devices. And we don't want to break them (just yet?). |
On @pquerner note, I vote for ES6 in |
rebased on next |
By all means, I don't want to keep OM "behind" with JavaScript usage. One can always just fork the release and manually patch things, or revert commits. Just wanted to give my 2 cts. :) |
Pretty sure I saw ES6 syntax in a merged PR before, so it might be too late to discuss that 😅 I say just keep using ES6 it's almost 2024! Edit:
magento-lts/js/mage/adminhtml/form.js Line 515 in 32773dd
|
So, now what? Do we convert ES6 to ES5 in v20? Or do we carry on with ES6 in v20? |
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.
Tested in backend browser console:
> Translator.translate('Please wait, loading...')
< 'Please wait, loading...'
> Translator.add('abc', 'xyz')
< undefined
> Translator.translate('abc')
< 'xyz'
> Translator.add({'foo': 'bar'})
< undefined
> Translator.translate('foo')
< 'bar'
needs extensive testing using language pack and checking that the frontend works as expected