-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
enables loading locales before Plotly #4453
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
Changes from 1 commit
6940aac
f169380
b4b20a7
c19fbf4
00aadd7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,11 @@ register([ | |
require('./locale-en-us') | ||
]); | ||
|
||
// locales that are present in the window should be loaded | ||
if(window.PlotlyLocales && window.PlotlyLocales.length) { | ||
register(window.PlotlyLocales); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could after this line have: delete window.PlotlyLocales; to de-pollute the window namespaces after we're done registering the locales. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in f169380 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it is a temporary variable, it may be better to add an underscore i.e. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the suggestion! I'll let @etpinard choose between the different options (see also #4453 (comment)) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering using sessionStorage may be a possibility? |
||
} | ||
|
||
// plot icons | ||
exports.Icons = require('./fonts/ploticon'); | ||
|
||
|
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.
would be safer. Note that
Plotly.register([])
is handled correctly (essentially a noop) at the moment.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.
Done in f169380