-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Date and number localization #2207
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
eacc99b
fe812eb
64968dd
a527828
43b73e0
27037af
2a8d38f
d0e0158
592fc9e
614d5be
331b2da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ var common = require('./util/common'); | |
var args = process.argv.slice(2); | ||
var argLocale = args[0]; | ||
|
||
var pathToEn = path.join(constants.pathToLib, 'locale-en.js'); | ||
var pathToEn = path.join(constants.pathToSrc, 'locale-en.js'); | ||
var pathToWCRegions = path.join(__dirname, '../node_modules/world-calendars/dist/regional'); | ||
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.
would be a bit more robust 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. Neat, I didn't know about |
||
|
||
if(!argLocale) { | ||
|
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.
🎩
bundle_tests/core_test
🌟Since we're constructing our own
d3.locale
now no matter what,locale-en
needs to be part of the core so it can be used as the fallback for missing pieces of other locales. Then for simplicity I moved the defaultlocale-en-US
to the core as well, which has the nice side-effect of keeping these redundant locales out ofdist/
.@etpinard seem reasonable? Are you OK with putting these two in the root
src/
directory? At least as long as we're not going to put any other locales into the core it doesn't seem like they warrant their own directory.Minor downside is the
lib/index*
files don't demonstrate how to register locales, but we should be able to to better than documenting it there anyhow - somewhere we will want examples of how to use locales both in the build process and via script tags.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.
This is very reasonable 👌
Yep, we should at least open up an issue on https://github.com/plotly/documentation/issues and / or add a Locale section to
dist/README.md
viatasks/stats.js
.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.
updated
dist/README.md
-> 331b2dawill open an issue at https://github.com/plotly/documentation once this is merged.