-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Fix moment locale loading in bidi support #3048
Conversation
this is the correct way to do it, especially since packaged versions of notebook are shipping without separate locale files
remove unused variable, redundant comment, don't need jquery
Also, while looking at this, I've noticed that
|
Thanks, I don't know much about this, but this looks like an improvement to me. cc @samarsultan and @rgbkrk (you've touched this file) |
I think you're right about the exact |
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.
Yeah this is much better to let moment resolve it.
It would be good to verify this with a non-English locale.
I've done a brief test with an arabic locale set. I made and installed an sdist to check for packaging problems. It seemed to be working, whereas 5.2.1 installed through conda still showed me 'ago' times in English, and had the error about loading the locale. |
This is throwing errors like
because of the way it's been implemented (issuing a require call to a presumed locale js file, which may not exist, especially since packaged versions of notebook are shipping with minimized moment, without the separate locale files). This PR does it in the correct way (getting moment to load it from its own internal set, if possible, also falling back to less-specific versions as necessary).